[MERGED] osmo-msc[master]: signal.h: Remove unused/dead signal definitions

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: signal.h: Remove unused/dead signal definitions
..


signal.h: Remove unused/dead signal definitions

Change-Id: Iba5be82e11fa1d5e5514bc86d8ec23cda24ae4c9
Related: OS#2528
---
M include/osmocom/msc/signal.h
1 file changed, 0 insertions(+), 14 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/signal.h b/include/osmocom/msc/signal.h
index 29b6a59..e854a64 100644
--- a/include/osmocom/msc/signal.h
+++ b/include/osmocom/msc/signal.h
@@ -37,8 +37,6 @@
SS_SMS,
SS_SUBSCR,
SS_SCALL,
-   SS_MSC,
-   SS_CCCH,
 };
 
 /* SS_PAGING signals */
@@ -100,18 +98,6 @@
struct gsm_sms *sms;
/* int paging result. Only the ones with > 0 */
int paging_result;
-};
-
-/* MSC signals */
-enum signal_msc {
-   S_MSC_LOST,
-   S_MSC_CONNECTED,
-   S_MSC_AUTHENTICATED,
-};
-
-struct bsc_msc_data;
-struct msc_signal_data {
-   struct bsc_msc_data *data;
 };
 
 #endif

-- 
To view, visit https://gerrit.osmocom.org/6057
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba5be82e11fa1d5e5514bc86d8ec23cda24ae4c9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-msc[master]: remove dead header files bsc_msc.h, bsc_msc_data.h and bsc_r...

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: remove dead header files bsc_msc.h, bsc_msc_data.h and bsc_rll.h
..


remove dead header files bsc_msc.h, bsc_msc_data.h and bsc_rll.h

Related: OS#2528
Change-Id: I13cc4513689af1d594952dd628738b1240560bb7
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/bsc_msc.h
D include/osmocom/msc/bsc_msc_data.h
D include/osmocom/msc/bsc_rll.h
M src/libcommon-cs/a_reset.c
M src/libcommon/gsm_data.c
M src/libmsc/gsm_04_11.c
M src/osmo-msc/msc_main.c
8 files changed, 1 insertion(+), 277 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 9c82d2f..7e86b12 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -2,8 +2,6 @@
a_iface.h \
a_iface_bssap.h \
bsc_api.h \
-   bsc_msc.h \
-   bsc_rll.h \
common.h \
common_cs.h \
ctrl.h \
@@ -27,7 +25,6 @@
openbscdefines.h \
a_reset.h \
osmo_msc.h \
-   bsc_msc_data.h \
rrlp.h \
signal.h \
silent_call.h \
diff --git a/include/osmocom/msc/bsc_msc.h b/include/osmocom/msc/bsc_msc.h
deleted file mode 100644
index d649f76..000
--- a/include/osmocom/msc/bsc_msc.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Routines to talk to the MSC using the IPA Protocol */
-/*
- * (C) 2010 by Holger Hans Peter Freyther 
- * (C) 2010 by On-Waves
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#ifndef BSC_MSC_H
-#define BSC_MSC_H
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-struct bsc_msc_dest {
-   struct llist_head list;
-
-   char *ip;
-   int port;
-   int dscp;
-};
-
-
-struct bsc_msc_connection {
-   /* FIXME: Remove stuff that is no longer needed! */
-   struct osmo_wqueue write_queue;
-   int is_connected;
-   int is_authenticated;
-   int first_contact;
-
-   struct llist_head *dests;
-
-   const char *name;
-
-   void (*connection_loss) (struct bsc_msc_connection *);
-   void (*connected) (struct bsc_msc_connection *);
-   struct osmo_timer_list reconnect_timer;
-   struct osmo_timer_list timeout_timer;
-
-   struct msgb *pending_msg;
-
-   /* Sigtran connection data */
-   struct osmo_sccp_instance *sccp;
-   struct osmo_sccp_user *sccp_user;
-   struct osmo_sccp_addr g_calling_addr;
-   struct osmo_sccp_addr g_called_addr;
-   struct a_reset_ctx *reset;
-
-   int conn_id_counter;
-};
-
-struct bsc_msc_connection *bsc_msc_create(void *ctx, struct llist_head *dest);
-int bsc_msc_connect(struct bsc_msc_connection *);
-void bsc_msc_schedule_connect(struct bsc_msc_connection *);
-
-void bsc_msc_lost(struct bsc_msc_connection *);
-
-struct msgb *bsc_msc_id_get_resp(int fixed, const char *token, const uint8_t 
*res, int len);
-
-#endif
diff --git a/include/osmocom/msc/bsc_msc_data.h 
b/include/osmocom/msc/bsc_msc_data.h
deleted file mode 100644
index 4a283d1..000
--- a/include/osmocom/msc/bsc_msc_data.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Data for the true BSC
- *
- * (C) 2010-2015 by Holger Hans Peter Freyther 
- * (C) 2010-2015 by On-Waves
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-/*
- * NOTE: This is about a *remote* MSC for OsmoBSC and is not part of libmsc.
- */
-
-#ifndef _OSMO_MSC_DATA_H
-#define _OSMO_MSC_DATA_H
-
-#include "bsc_msc.h"
-
-#include 
-#include 
-
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-

[MERGED] osmo-msc[master]: remove dead code in auth.h / auth.c

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: remove dead code in auth.h / auth.c
..


remove dead code in auth.h / auth.c

Change-Id: I57e3b79a95a35c4783dc3775a88d15f13cbec13e
Related: OS#2528
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/auth.h
M src/libmsc/Makefile.am
D src/libmsc/auth.c
M src/libmsc/gsm_04_08.c
5 files changed, 0 insertions(+), 65 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 0adc746..9c82d2f 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -1,7 +1,6 @@
 noinst_HEADERS = \
a_iface.h \
a_iface_bssap.h \
-   auth.h \
bsc_api.h \
bsc_msc.h \
bsc_rll.h \
diff --git a/include/osmocom/msc/auth.h b/include/osmocom/msc/auth.h
deleted file mode 100644
index b314bbf..000
--- a/include/osmocom/msc/auth.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _AUTH_H
-#define _AUTH_H
-
-#include 
-
-struct gsm_auth_tuple;
-
-enum auth_action {
-   AUTH_ERROR  = -1,   /* Internal error */
-   AUTH_NOT_AVAIL  = 0,/* No auth tuple available */
-   AUTH_DO_AUTH_THEN_CIPH  = 1,/* Firsth authenticate, then cipher */
-   AUTH_DO_CIPH= 2,/* Only ciphering */
-   AUTH_DO_AUTH= 3,/* Only authentication, no ciphering */
-};
-
-extern const struct value_string auth_action_names[];
-static inline const char *auth_action_str(enum auth_action a)
-{
-   return get_value_string(auth_action_names, a);
-}
-
-#endif /* _AUTH_H */
diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am
index 6449948..8ae0e18 100644
--- a/src/libmsc/Makefile.am
+++ b/src/libmsc/Makefile.am
@@ -28,7 +28,6 @@
 libmsc_a_SOURCES = \
a_iface.c \
a_iface_bssap.c \
-   auth.c \
msc_vty.c \
db.c \
gsm_04_08.c \
diff --git a/src/libmsc/auth.c b/src/libmsc/auth.c
deleted file mode 100644
index 7c78c6e..000
--- a/src/libmsc/auth.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Authentication related functions */
-
-/*
- * (C) 2010 by Sylvain Munaut 
- *
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-
-#include 
-
-const struct value_string auth_action_names[] = {
-   OSMO_VALUE_STRING(AUTH_ERROR),
-   OSMO_VALUE_STRING(AUTH_NOT_AVAIL),
-   OSMO_VALUE_STRING(AUTH_DO_AUTH_THEN_CIPH),
-   OSMO_VALUE_STRING(AUTH_DO_CIPH),
-   OSMO_VALUE_STRING(AUTH_DO_AUTH),
-   { 0, NULL }
-};
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 7afd0c7..126a216 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -34,7 +34,6 @@
 
 #include "bscconfig.h"
 
-#include 
 #include 
 #include 
 #include 

-- 
To view, visit https://gerrit.osmocom.org/6055
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I57e3b79a95a35c4783dc3775a88d15f13cbec13e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-msc[master]: debug: Remove dead log categories

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: debug: Remove dead log categories
..


debug: Remove dead log categories

Change-Id: Ibdfc39ead4f0c5e3a74321e9d2c9720ae1603541
Related: OS#2528
---
M include/osmocom/msc/debug.h
M src/libcommon/debug.c
M src/libcommon/gsup_client.c
M src/libcommon/gsup_test_client.c
M src/osmo-msc/msc_main.c
5 files changed, 4 insertions(+), 94 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/debug.h b/include/osmocom/msc/debug.h
index 65e197d..f99dba5 100644
--- a/include/osmocom/msc/debug.h
+++ b/include/osmocom/msc/debug.h
@@ -12,35 +12,18 @@
DCC,
DMM,
DRR,
-   DRSL,
-   DNM,
DMNCC,
DPAG,
-   DMEAS,
-   DSCCP,
DMSC,
DMGCP,
DHO,
DDB,
DREF,
-   DGPRS,
-   DNS,
-   DBSSGP,
-   DLLC,
-   DSNDCP,
-   DSLHC,
-   DNAT,
DCTRL,
DSMPP,
-   DFILTER,
-   DGTPHUB,
DRANAP,
-   DSUA,
-   DV42BIS,
-   DPCU,
DVLR,
DIUCS,
-   DSIGTRAN,
Debug_LastEntry,
 };
 
diff --git a/src/libcommon/debug.c b/src/libcommon/debug.c
index 661eb66..8c0e787 100644
--- a/src/libcommon/debug.c
+++ b/src/libcommon/debug.c
@@ -60,18 +60,6 @@
.color = "\033[1;34m",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
-   [DRSL] = {
-   .name = "DRSL",
-   .description = "A-bis Radio Siganlling Link (RSL)",
-   .color = "\033[1;35m",
-   .enabled = 1, .loglevel = LOGL_NOTICE,
-   },
-   [DNM] = {
-   .name = "DNM",
-   .description = "A-bis Network Management / O&M (NM/OML)",
-   .color = "\033[1;36m",
-   .enabled = 1, .loglevel = LOGL_INFO,
-   },
[DMNCC] = {
.name = "DMNCC",
.description = "MNCC API for Call Control application",
@@ -82,16 +70,6 @@
.name = "DPAG",
.description = "Paging Subsystem",
.color = "\033[1;38m",
-   .enabled = 1, .loglevel = LOGL_NOTICE,
-   },
-   [DMEAS] = {
-   .name = "DMEAS",
-   .description = "Radio Measurement Processing",
-   .enabled = 0, .loglevel = LOGL_NOTICE,
-   },
-   [DSCCP] = {
-   .name = "DSCCP",
-   .description = "SCCP Protocol",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
[DMSC] = {
@@ -119,36 +97,6 @@
.description = "Reference Counting",
.enabled = 0, .loglevel = LOGL_NOTICE,
},
-   [DGPRS] = {
-   .name = "DGPRS",
-   .description = "GPRS Packet Service",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DNS] = {
-   .name = "DNS",
-   .description = "GPRS Network Service (NS)",
-   .enabled = 1, .loglevel = LOGL_INFO,
-   },
-   [DBSSGP] = {
-   .name = "DBSSGP",
-   .description = "GPRS BSS Gateway Protocol (BSSGP)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DLLC] = {
-   .name = "DLLC",
-   .description = "GPRS Logical Link Control Protocol (LLC)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DSNDCP] = {
-   .name = "DSNDCP",
-   .description = "GPRS Sub-Network Dependent Control Protocol 
(SNDCP)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DNAT] = {
-   .name = "DNAT",
-   .description = "GSM 08.08 NAT/Multiplexer",
-   .enabled = 1, .loglevel = LOGL_NOTICE,
-   },
[DCTRL] = {
.name = "DCTRL",
.description = "Control interface",
@@ -159,24 +107,9 @@
.description = "SMPP interface for external SMS apps",
.enabled = 1, .loglevel = LOGL_DEBUG,
},
-   [DFILTER] = {
-   .name = "DFILTER",
-   .description = "BSC/NAT IMSI based filtering",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
[DRANAP] = {
.name = "DRANAP",
.description = "Radio Access Network Application Part Protocol",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DSUA] = {
-   .name = "DSUA",
-   .description = "SCCP User Adaptation Protocol",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DPCU] = {
-   .name = "DPCU",
-   .description = "PCU Interface",
.enabled = 1, .loglevel = LOGL_DEBUG,
},
[DVLR] = {
@@ -187,12 +120,6 @@
[DIUCS] = {
.nam

[MERGED] osmo-bts[master]: various Makefile.am: add missing CFLAGS

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: various Makefile.am: add missing CFLAGS
..


various Makefile.am: add missing CFLAGS

Change-Id: I0717aaaf062a7c3c8b35520fa837b51fd6aed47f
---
M tests/handover/Makefile.am
M tests/meas/Makefile.am
M tests/tx_power/Makefile.am
3 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 5757699..966ea46 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = handover_test
 EXTRA_DIST = handover_test.ok
diff --git a/tests/meas/Makefile.am b/tests/meas/Makefile.am
index 266f5e7..3c83e52 100644
--- a/tests/meas/Makefile.am
+++ b/tests/meas/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = meas_test
 noinst_HEADERS = sysmobts_fr_samples.h
diff --git a/tests/tx_power/Makefile.am b/tests/tx_power/Makefile.am
index 5848c71..cd7ccc2 100644
--- a/tests/tx_power/Makefile.am
+++ b/tests/tx_power/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = tx_power_test
 EXTRA_DIST = tx_power_test.ok tx_power_test.err

-- 
To view, visit https://gerrit.osmocom.org/6061
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0717aaaf062a7c3c8b35520fa837b51fd6aed47f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bts[master]: gitignore: add missing entries

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: gitignore: add missing entries
..


gitignore: add missing entries

Change-Id: I509e564a82b6632c0cdf052526e9f7f3397155ce
---
M .gitignore
1 file changed, 7 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/.gitignore b/.gitignore
index 1780e1c..69e2c36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,8 +19,14 @@
 install-sh
 missing
 stamp-h1
+libtool
+ltmain.sh
 core
 core.*
+
+# git-version-gen magic
+.tarball-version
+.version
 
 src/osmo-bts-sysmo/sysmobts-calib
 src/osmo-bts-sysmo/l1fwd-proxy
@@ -46,6 +52,7 @@
 tests/paging/paging_test
 tests/cipher/cipher_test
 tests/sysmobts/sysmobts_test
+tests/meas/meas_test
 tests/misc/misc_test
 tests/handover/handover_test
 tests/tx_power/tx_power_test

-- 
To view, visit https://gerrit.osmocom.org/6062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I509e564a82b6632c0cdf052526e9f7f3397155ce
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-msc[master]: remove unused ipaccess.h

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: remove unused ipaccess.h
..


remove unused ipaccess.h

Change-Id: Ibee159a119a1cce2b3fcbdabf3491673aed4ea95
Related: OS#2528
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/ipaccess.h
2 files changed, 0 insertions(+), 53 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index cb19186..0adc746 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -18,7 +18,6 @@
gsm_data_shared.h \
gsm_subscriber.h \
gsup_client.h \
-   ipaccess.h \
iucs.h \
iucs_ranap.h \
iu_dummy.h \
diff --git a/include/osmocom/msc/ipaccess.h b/include/osmocom/msc/ipaccess.h
deleted file mode 100644
index 82e89c2..000
--- a/include/osmocom/msc/ipaccess.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _IPACCESS_H
-#define _IPACCESS_H
-
-#include 
-#include "gsm_subscriber.h"
-#include 
-#include 
-#include 
-
-struct ipac_msgt_sccp_state {
-   uint8_t src_ref[3];
-   uint8_t dst_ref[3];
-   uint8_t trans_id;
-   uint8_t invoke_id;
-   charimsi[GSM23003_IMSI_MAX_DIGITS+1];
-   uint8_t data[0];
-} __attribute__((packed));
-
-/*
- * @add_remove 0 for remove, 1 for add, 3 to asK
- * @nr_lacs Number of extra lacs inside this package
- * @lac One lac entry
- */
-struct ipac_ext_lac_cmd {
-   uint8_t add_remove;
-   uint8_t nr_extra_lacs;
-   uint16_t lac;
-   uint8_t data[0];
-} __attribute__((packed));
-
-void ipaccess_drop_oml(struct gsm_bts *bts);
-void ipaccess_drop_rsl(struct gsm_bts_trx *trx);
-
-struct sdp_header_item {
-   struct sdp_header_entry header_entry;
-   struct llist_head entry;
-   off_t absolute_offset;
-};
-
-struct sdp_header {
-   struct sdp_firmware firmware_info;
-
-   /* for more_magic a list of sdp_header_entry_list */
-   struct llist_head header_list;
-
-   /* the entry of the sdp_header */
-   struct llist_head entry;
-};
-
-int ipaccess_analyze_file(int fd, const unsigned int st_size, const unsigned 
base_offset, struct llist_head *list);
-
-#endif /* _IPACCESS_H */

-- 
To view, visit https://gerrit.osmocom.org/6054
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibee159a119a1cce2b3fcbdabf3491673aed4ea95
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-msc[master]: remove dead ctrl.h header file

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: remove dead ctrl.h header file
..


remove dead ctrl.h header file

Change-Id: I3ea0d98580085982ec0f20165c0ddcfd439e7419
Related: OS#2528
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/ctrl.h
M src/osmo-msc/msc_main.c
3 files changed, 0 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 7e86b12..ec231d0 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -4,7 +4,6 @@
bsc_api.h \
common.h \
common_cs.h \
-   ctrl.h \
db.h \
debug.h \
gsm_04_08.h \
diff --git a/include/osmocom/msc/ctrl.h b/include/osmocom/msc/ctrl.h
deleted file mode 100644
index c5ac210..000
--- a/include/osmocom/msc/ctrl.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-
-struct ctrl_handle *bsc_controlif_setup(struct gsm_network *net,
-   const char *bind_addr, uint16_t port);
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 9fa98f3..a4b833e 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -57,7 +57,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

-- 
To view, visit https://gerrit.osmocom.org/6058
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ea0d98580085982ec0f20165c0ddcfd439e7419
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bts[master]: cosmetic: Makefile.am whitespace

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: Makefile.am whitespace
..


cosmetic: Makefile.am whitespace

Change-Id: I480fbf85912de2ea3518a906b9edf23b1485e936
---
M tests/handover/Makefile.am
M tests/meas/Makefile.am
M tests/tx_power/Makefile.am
3 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 8bff297..5757699 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS)$(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = handover_test
 EXTRA_DIST = handover_test.ok
diff --git a/tests/meas/Makefile.am b/tests/meas/Makefile.am
index 895d474..266f5e7 100644
--- a/tests/meas/Makefile.am
+++ b/tests/meas/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS)$(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = meas_test
 noinst_HEADERS = sysmobts_fr_samples.h
diff --git a/tests/tx_power/Makefile.am b/tests/tx_power/Makefile.am
index 349958c..5848c71 100644
--- a/tests/tx_power/Makefile.am
+++ b/tests/tx_power/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS)$(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = tx_power_test
 EXTRA_DIST = tx_power_test.ok tx_power_test.err

-- 
To view, visit https://gerrit.osmocom.org/6060
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I480fbf85912de2ea3518a906b9edf23b1485e936
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bts[master]: gitignore: add missing entries

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I509e564a82b6632c0cdf052526e9f7f3397155ce
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: cosmetic: Makefile.am whitespace

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6060
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I480fbf85912de2ea3518a906b9edf23b1485e936
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-bts[master]: various Makefile.am: add missing CFLAGS

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6061
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0717aaaf062a7c3c8b35520fa837b51fd6aed47f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-bts[master]: cosmetic: Makefile.am whitespace

2018-01-24 Thread Alexander Huemer

Review at  https://gerrit.osmocom.org/6060

cosmetic: Makefile.am whitespace

Change-Id: I480fbf85912de2ea3518a906b9edf23b1485e936
---
M tests/handover/Makefile.am
M tests/meas/Makefile.am
M tests/tx_power/Makefile.am
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/6060/1

diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 8bff297..5757699 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS)$(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = handover_test
 EXTRA_DIST = handover_test.ok
diff --git a/tests/meas/Makefile.am b/tests/meas/Makefile.am
index 895d474..266f5e7 100644
--- a/tests/meas/Makefile.am
+++ b/tests/meas/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS)$(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = meas_test
 noinst_HEADERS = sysmobts_fr_samples.h
diff --git a/tests/tx_power/Makefile.am b/tests/tx_power/Makefile.am
index 349958c..5848c71 100644
--- a/tests/tx_power/Makefile.am
+++ b/tests/tx_power/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS)$(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = tx_power_test
 EXTRA_DIST = tx_power_test.ok tx_power_test.err

-- 
To view, visit https://gerrit.osmocom.org/6060
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I480fbf85912de2ea3518a906b9edf23b1485e936
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 


[PATCH] osmo-bts[master]: various Makefile.am: add missing CFLAGS

2018-01-24 Thread Alexander Huemer

Review at  https://gerrit.osmocom.org/6061

various Makefile.am: add missing CFLAGS

Change-Id: I0717aaaf062a7c3c8b35520fa837b51fd6aed47f
---
M tests/handover/Makefile.am
M tests/meas/Makefile.am
M tests/tx_power/Makefile.am
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/61/6061/1

diff --git a/tests/handover/Makefile.am b/tests/handover/Makefile.am
index 5757699..966ea46 100644
--- a/tests/handover/Makefile.am
+++ b/tests/handover/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = handover_test
 EXTRA_DIST = handover_test.ok
diff --git a/tests/meas/Makefile.am b/tests/meas/Makefile.am
index 266f5e7..3c83e52 100644
--- a/tests/meas/Makefile.am
+++ b/tests/meas/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = meas_test
 noinst_HEADERS = sysmobts_fr_samples.h
diff --git a/tests/tx_power/Makefile.am b/tests/tx_power/Makefile.am
index 5848c71..cd7ccc2 100644
--- a/tests/tx_power/Makefile.am
+++ b/tests/tx_power/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS)
+AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) 
$(LIBOSMOCODEC_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOABIS_CFLAGS)
 LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOCODEC_LIBS) 
$(LIBOSMOTRAU_LIBS) $(LIBOSMOABIS_LIBS)
 noinst_PROGRAMS = tx_power_test
 EXTRA_DIST = tx_power_test.ok tx_power_test.err

-- 
To view, visit https://gerrit.osmocom.org/6061
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0717aaaf062a7c3c8b35520fa837b51fd6aed47f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 


[PATCH] osmo-bts[master]: gitignore: add missing entries

2018-01-24 Thread Alexander Huemer

Review at  https://gerrit.osmocom.org/6062

gitignore: add missing entries

Change-Id: I509e564a82b6632c0cdf052526e9f7f3397155ce
---
M .gitignore
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/6062/1

diff --git a/.gitignore b/.gitignore
index 1780e1c..69e2c36 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,8 +19,14 @@
 install-sh
 missing
 stamp-h1
+libtool
+ltmain.sh
 core
 core.*
+
+# git-version-gen magic
+.tarball-version
+.version
 
 src/osmo-bts-sysmo/sysmobts-calib
 src/osmo-bts-sysmo/l1fwd-proxy
@@ -46,6 +52,7 @@
 tests/paging/paging_test
 tests/cipher/cipher_test
 tests/sysmobts/sysmobts_test
+tests/meas/meas_test
 tests/misc/misc_test
 tests/handover/handover_test
 tests/tx_power/tx_power_test

-- 
To view, visit https://gerrit.osmocom.org/6062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I509e564a82b6632c0cdf052526e9f7f3397155ce
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Huemer 


osmo-msc[master]: remove dead ctrl.h header file

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6058
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3ea0d98580085982ec0f20165c0ddcfd439e7419
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: debug: Remove dead log categories

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6059
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibdfc39ead4f0c5e3a74321e9d2c9720ae1603541
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: remove dead code in auth.h / auth.c

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6055
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I57e3b79a95a35c4783dc3775a88d15f13cbec13e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: remove dead header files bsc_msc.h, bsc_msc_data.h and bsc_r...

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6056
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I13cc4513689af1d594952dd628738b1240560bb7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: signal.h: Remove unused/dead signal definitions

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6057
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba5be82e11fa1d5e5514bc86d8ec23cda24ae4c9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: remove unused ipaccess.h

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6054
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibee159a119a1cce2b3fcbdabf3491673aed4ea95
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-msc[master]: Massive removal of unused code/structs/headers

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Massive removal of unused code/structs/headers
..


Massive removal of unused code/structs/headers

osmo-msc still had large amounts of dead code that came along from
openbsc.git.  This commit removes a lot of it, mostly stuff relevant
only to the BSC side of things (or even GPRS).

Change-Id: I247def85da2dc3ec461389fb74414a0d964e7e3c
Related: OS#2528
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/abis_nm.h
D include/osmocom/msc/abis_om2000.h
D include/osmocom/msc/abis_rsl.h
D include/osmocom/msc/arfcn_range_encode.h
M include/osmocom/msc/bsc_api.h
D include/osmocom/msc/bsc_msg_filter.h
D include/osmocom/msc/chan_alloc.h
D include/osmocom/msc/common_bsc.h
D include/osmocom/msc/crc24.h
D include/osmocom/msc/e1_config.h
M include/osmocom/msc/gsm_04_08.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_data_shared.h
M include/osmocom/msc/gsm_subscriber.h
D include/osmocom/msc/handover.h
D include/osmocom/msc/handover_decision.h
D include/osmocom/msc/meas_rep.h
D include/osmocom/msc/misdn.h
D include/osmocom/msc/network_listen.h
D include/osmocom/msc/osmo_bsc.h
D include/osmocom/msc/osmo_bsc_reset.h
D include/osmocom/msc/osmo_bsc_sigtran.h
D include/osmocom/msc/osmux.h
D include/osmocom/msc/rs232.h
D include/osmocom/msc/rtp_proxy.h
M include/osmocom/msc/signal.h
D include/osmocom/msc/slhc.h
D include/osmocom/msc/system_information.h
D include/osmocom/msc/trau_mux.h
D include/osmocom/msc/trau_upqueue.h
M include/osmocom/msc/vty.h
M src/libcommon-cs/a_reset.c
M src/libcommon/Makefile.am
M src/libcommon/common_vty.c
M src/libcommon/gsm_data.c
D src/libcommon/gsm_data_shared.c
M src/libcommon/talloc_ctx.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/sms_queue.c
M src/libmsc/vty_interface_layer3.c
M src/osmo-msc/msc_main.c
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_tests.c
52 files changed, 9 insertions(+), 3,552 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 82e8207..cb19186 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -1,24 +1,15 @@
 noinst_HEADERS = \
-   abis_nm.h \
-   abis_om2000.h \
-   abis_rsl.h \
a_iface.h \
a_iface_bssap.h \
-   arfcn_range_encode.h \
auth.h \
bsc_api.h \
bsc_msc.h \
-   bsc_msg_filter.h \
bsc_rll.h \
-   chan_alloc.h \
common.h \
-   common_bsc.h \
common_cs.h \
-   crc24.h \
ctrl.h \
db.h \
debug.h \
-   e1_config.h \
gsm_04_08.h \
gsm_04_11.h \
gsm_04_14.h \
@@ -27,39 +18,25 @@
gsm_data_shared.h \
gsm_subscriber.h \
gsup_client.h \
-   handover.h \
-   handover_decision.h \
ipaccess.h \
iucs.h \
iucs_ranap.h \
iu_dummy.h \
-   meas_rep.h \
-   misdn.h \
mncc.h \
mncc_int.h \
msc_ifaces.h \
-   network_listen.h \
oap_client.h \
openbscdefines.h \
-   osmo_bsc.h \
a_reset.h \
osmo_msc.h \
-   osmo_bsc_sigtran.h \
bsc_msc_data.h \
-   osmux.h \
rrlp.h \
-   rs232.h \
-   rtp_proxy.h \
signal.h \
silent_call.h \
-   slhc.h \
smpp.h \
sms_queue.h \
socket.h \
-   system_information.h \
transaction.h \
-   trau_mux.h \
-   trau_upqueue.h \
ussd.h \
vlr.h \
vty.h \
diff --git a/include/osmocom/msc/abis_nm.h b/include/osmocom/msc/abis_nm.h
deleted file mode 100644
index 2581962..000
--- a/include/osmocom/msc/abis_nm.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* GSM Network Management messages on the A-bis interface 
- * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */
-
-/* (C) 2008-2009 by Harald Welte 
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#ifndef _NM_H
-#define _N

[MERGED] osmo-msc[master]: jenkins.sh: Don't depend on osmo-ggsn

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: jenkins.sh: Don't depend on osmo-ggsn
..


jenkins.sh: Don't depend on osmo-ggsn

There's nothing GPRS related left in osmo-msc, and hence no reason
why we should build osmo-ggsn as a build dependency.

Change-Id: I096f63e471dc8fdbd42a78f67d433f61b830615b
---
M contrib/jenkins.sh
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index e4f90e6..d80422d 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -29,7 +29,6 @@
 osmo-build-dep.sh libosmo-netif
 osmo-build-dep.sh libosmo-sccp
 PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34
-osmo-build-dep.sh osmo-ggsn
 osmo-build-dep.sh osmo-mgw
 
 if [ "x$IU" = "x--enable-iu" ]; then

-- 
To view, visit https://gerrit.osmocom.org/6052
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I096f63e471dc8fdbd42a78f67d433f61b830615b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-msc[master]: Massive removal of unused code/structs/headers

2018-01-24 Thread Harald Welte

Patch Set 3: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6051
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I247def85da2dc3ec461389fb74414a0d964e7e3c
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: jenkins.sh: Don't depend on osmo-ggsn

2018-01-24 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6052
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I096f63e471dc8fdbd42a78f67d433f61b830615b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-msc[master]: remove dead code in auth.h / auth.c

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6055

remove dead code in auth.h / auth.c

Change-Id: I57e3b79a95a35c4783dc3775a88d15f13cbec13e
Related: OS#2528
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/auth.h
M src/libmsc/Makefile.am
D src/libmsc/auth.c
M src/libmsc/gsm_04_08.c
5 files changed, 0 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/55/6055/1

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 0adc746..9c82d2f 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -1,7 +1,6 @@
 noinst_HEADERS = \
a_iface.h \
a_iface_bssap.h \
-   auth.h \
bsc_api.h \
bsc_msc.h \
bsc_rll.h \
diff --git a/include/osmocom/msc/auth.h b/include/osmocom/msc/auth.h
deleted file mode 100644
index b314bbf..000
--- a/include/osmocom/msc/auth.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _AUTH_H
-#define _AUTH_H
-
-#include 
-
-struct gsm_auth_tuple;
-
-enum auth_action {
-   AUTH_ERROR  = -1,   /* Internal error */
-   AUTH_NOT_AVAIL  = 0,/* No auth tuple available */
-   AUTH_DO_AUTH_THEN_CIPH  = 1,/* Firsth authenticate, then cipher */
-   AUTH_DO_CIPH= 2,/* Only ciphering */
-   AUTH_DO_AUTH= 3,/* Only authentication, no ciphering */
-};
-
-extern const struct value_string auth_action_names[];
-static inline const char *auth_action_str(enum auth_action a)
-{
-   return get_value_string(auth_action_names, a);
-}
-
-#endif /* _AUTH_H */
diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am
index 6449948..8ae0e18 100644
--- a/src/libmsc/Makefile.am
+++ b/src/libmsc/Makefile.am
@@ -28,7 +28,6 @@
 libmsc_a_SOURCES = \
a_iface.c \
a_iface_bssap.c \
-   auth.c \
msc_vty.c \
db.c \
gsm_04_08.c \
diff --git a/src/libmsc/auth.c b/src/libmsc/auth.c
deleted file mode 100644
index 7c78c6e..000
--- a/src/libmsc/auth.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Authentication related functions */
-
-/*
- * (C) 2010 by Sylvain Munaut 
- *
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-
-#include 
-
-const struct value_string auth_action_names[] = {
-   OSMO_VALUE_STRING(AUTH_ERROR),
-   OSMO_VALUE_STRING(AUTH_NOT_AVAIL),
-   OSMO_VALUE_STRING(AUTH_DO_AUTH_THEN_CIPH),
-   OSMO_VALUE_STRING(AUTH_DO_CIPH),
-   OSMO_VALUE_STRING(AUTH_DO_AUTH),
-   { 0, NULL }
-};
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 7afd0c7..126a216 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -34,7 +34,6 @@
 
 #include "bscconfig.h"
 
-#include 
 #include 
 #include 
 #include 

-- 
To view, visit https://gerrit.osmocom.org/6055
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57e3b79a95a35c4783dc3775a88d15f13cbec13e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-msc[master]: debug: Remove dead log categories

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6059

debug: Remove dead log categories

Change-Id: Ibdfc39ead4f0c5e3a74321e9d2c9720ae1603541
Related: OS#2528
---
M include/osmocom/msc/debug.h
M src/libcommon/debug.c
M src/libcommon/gsup_client.c
M src/libcommon/gsup_test_client.c
M src/osmo-msc/msc_main.c
5 files changed, 4 insertions(+), 94 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/59/6059/1

diff --git a/include/osmocom/msc/debug.h b/include/osmocom/msc/debug.h
index 65e197d..f99dba5 100644
--- a/include/osmocom/msc/debug.h
+++ b/include/osmocom/msc/debug.h
@@ -12,35 +12,18 @@
DCC,
DMM,
DRR,
-   DRSL,
-   DNM,
DMNCC,
DPAG,
-   DMEAS,
-   DSCCP,
DMSC,
DMGCP,
DHO,
DDB,
DREF,
-   DGPRS,
-   DNS,
-   DBSSGP,
-   DLLC,
-   DSNDCP,
-   DSLHC,
-   DNAT,
DCTRL,
DSMPP,
-   DFILTER,
-   DGTPHUB,
DRANAP,
-   DSUA,
-   DV42BIS,
-   DPCU,
DVLR,
DIUCS,
-   DSIGTRAN,
Debug_LastEntry,
 };
 
diff --git a/src/libcommon/debug.c b/src/libcommon/debug.c
index 661eb66..8c0e787 100644
--- a/src/libcommon/debug.c
+++ b/src/libcommon/debug.c
@@ -60,18 +60,6 @@
.color = "\033[1;34m",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
-   [DRSL] = {
-   .name = "DRSL",
-   .description = "A-bis Radio Siganlling Link (RSL)",
-   .color = "\033[1;35m",
-   .enabled = 1, .loglevel = LOGL_NOTICE,
-   },
-   [DNM] = {
-   .name = "DNM",
-   .description = "A-bis Network Management / O&M (NM/OML)",
-   .color = "\033[1;36m",
-   .enabled = 1, .loglevel = LOGL_INFO,
-   },
[DMNCC] = {
.name = "DMNCC",
.description = "MNCC API for Call Control application",
@@ -82,16 +70,6 @@
.name = "DPAG",
.description = "Paging Subsystem",
.color = "\033[1;38m",
-   .enabled = 1, .loglevel = LOGL_NOTICE,
-   },
-   [DMEAS] = {
-   .name = "DMEAS",
-   .description = "Radio Measurement Processing",
-   .enabled = 0, .loglevel = LOGL_NOTICE,
-   },
-   [DSCCP] = {
-   .name = "DSCCP",
-   .description = "SCCP Protocol",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
[DMSC] = {
@@ -119,36 +97,6 @@
.description = "Reference Counting",
.enabled = 0, .loglevel = LOGL_NOTICE,
},
-   [DGPRS] = {
-   .name = "DGPRS",
-   .description = "GPRS Packet Service",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DNS] = {
-   .name = "DNS",
-   .description = "GPRS Network Service (NS)",
-   .enabled = 1, .loglevel = LOGL_INFO,
-   },
-   [DBSSGP] = {
-   .name = "DBSSGP",
-   .description = "GPRS BSS Gateway Protocol (BSSGP)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DLLC] = {
-   .name = "DLLC",
-   .description = "GPRS Logical Link Control Protocol (LLC)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DSNDCP] = {
-   .name = "DSNDCP",
-   .description = "GPRS Sub-Network Dependent Control Protocol 
(SNDCP)",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DNAT] = {
-   .name = "DNAT",
-   .description = "GSM 08.08 NAT/Multiplexer",
-   .enabled = 1, .loglevel = LOGL_NOTICE,
-   },
[DCTRL] = {
.name = "DCTRL",
.description = "Control interface",
@@ -159,24 +107,9 @@
.description = "SMPP interface for external SMS apps",
.enabled = 1, .loglevel = LOGL_DEBUG,
},
-   [DFILTER] = {
-   .name = "DFILTER",
-   .description = "BSC/NAT IMSI based filtering",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
[DRANAP] = {
.name = "DRANAP",
.description = "Radio Access Network Application Part Protocol",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DSUA] = {
-   .name = "DSUA",
-   .description = "SCCP User Adaptation Protocol",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DPCU] = {
-   .name = "DPCU",
-   .description = "PCU Interface",
.enabled = 1, .loglevel = LOGL_DEBUG,
},
[DVLR] = {
@@ -187,12 +120,6 @@
[DIUCS] = {
.name = "DIUCS",
.description = "Iu-CS Protocol",
-   .enabled = 1, .loglevel = LOGL_DEBUG,
-   },
-   [DSIGTRAN] 

[PATCH] osmo-msc[master]: remove dead header files bsc_msc.h, bsc_msc_data.h and bsc_r...

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6056

remove dead header files bsc_msc.h, bsc_msc_data.h and bsc_rll.h

Related: OS#2528
Change-Id: I13cc4513689af1d594952dd628738b1240560bb7
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/bsc_msc.h
D include/osmocom/msc/bsc_msc_data.h
D include/osmocom/msc/bsc_rll.h
M src/libcommon-cs/a_reset.c
M src/libcommon/gsm_data.c
M src/libmsc/gsm_04_11.c
M src/osmo-msc/msc_main.c
8 files changed, 1 insertion(+), 277 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/56/6056/1

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 9c82d2f..7e86b12 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -2,8 +2,6 @@
a_iface.h \
a_iface_bssap.h \
bsc_api.h \
-   bsc_msc.h \
-   bsc_rll.h \
common.h \
common_cs.h \
ctrl.h \
@@ -27,7 +25,6 @@
openbscdefines.h \
a_reset.h \
osmo_msc.h \
-   bsc_msc_data.h \
rrlp.h \
signal.h \
silent_call.h \
diff --git a/include/osmocom/msc/bsc_msc.h b/include/osmocom/msc/bsc_msc.h
deleted file mode 100644
index d649f76..000
--- a/include/osmocom/msc/bsc_msc.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Routines to talk to the MSC using the IPA Protocol */
-/*
- * (C) 2010 by Holger Hans Peter Freyther 
- * (C) 2010 by On-Waves
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#ifndef BSC_MSC_H
-#define BSC_MSC_H
-
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-struct bsc_msc_dest {
-   struct llist_head list;
-
-   char *ip;
-   int port;
-   int dscp;
-};
-
-
-struct bsc_msc_connection {
-   /* FIXME: Remove stuff that is no longer needed! */
-   struct osmo_wqueue write_queue;
-   int is_connected;
-   int is_authenticated;
-   int first_contact;
-
-   struct llist_head *dests;
-
-   const char *name;
-
-   void (*connection_loss) (struct bsc_msc_connection *);
-   void (*connected) (struct bsc_msc_connection *);
-   struct osmo_timer_list reconnect_timer;
-   struct osmo_timer_list timeout_timer;
-
-   struct msgb *pending_msg;
-
-   /* Sigtran connection data */
-   struct osmo_sccp_instance *sccp;
-   struct osmo_sccp_user *sccp_user;
-   struct osmo_sccp_addr g_calling_addr;
-   struct osmo_sccp_addr g_called_addr;
-   struct a_reset_ctx *reset;
-
-   int conn_id_counter;
-};
-
-struct bsc_msc_connection *bsc_msc_create(void *ctx, struct llist_head *dest);
-int bsc_msc_connect(struct bsc_msc_connection *);
-void bsc_msc_schedule_connect(struct bsc_msc_connection *);
-
-void bsc_msc_lost(struct bsc_msc_connection *);
-
-struct msgb *bsc_msc_id_get_resp(int fixed, const char *token, const uint8_t 
*res, int len);
-
-#endif
diff --git a/include/osmocom/msc/bsc_msc_data.h 
b/include/osmocom/msc/bsc_msc_data.h
deleted file mode 100644
index 4a283d1..000
--- a/include/osmocom/msc/bsc_msc_data.h
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Data for the true BSC
- *
- * (C) 2010-2015 by Holger Hans Peter Freyther 
- * (C) 2010-2015 by On-Waves
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-/*
- * NOTE: This is about a *remote* MSC for OsmoBSC and is not part of libmsc.
- */
-
-#ifndef _OSMO_MSC_DATA_H
-#define _OSMO_MSC_DATA_H
-
-#include "bsc_msc.h"
-
-#include 
-#include 
-
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-struct osmo_bsc_rf;
-struct gsm_network;
-
-struct gsm_audio_support {
-uint8_t hr  : 1,
-ver : 7;
-};
-
-enum {
-   MSC_CON_TYPE_NORMAL,
-   M

[PATCH] osmo-msc[master]: remove dead ctrl.h header file

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6058

remove dead ctrl.h header file

Change-Id: I3ea0d98580085982ec0f20165c0ddcfd439e7419
Related: OS#2528
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/ctrl.h
M src/osmo-msc/msc_main.c
3 files changed, 0 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/58/6058/1

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 7e86b12..ec231d0 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -4,7 +4,6 @@
bsc_api.h \
common.h \
common_cs.h \
-   ctrl.h \
db.h \
debug.h \
gsm_04_08.h \
diff --git a/include/osmocom/msc/ctrl.h b/include/osmocom/msc/ctrl.h
deleted file mode 100644
index c5ac210..000
--- a/include/osmocom/msc/ctrl.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-
-struct ctrl_handle *bsc_controlif_setup(struct gsm_network *net,
-   const char *bind_addr, uint16_t port);
diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 9fa98f3..a4b833e 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -57,7 +57,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 

-- 
To view, visit https://gerrit.osmocom.org/6058
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ea0d98580085982ec0f20165c0ddcfd439e7419
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-msc[master]: signal.h: Remove unused/dead signal definitions

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6057

signal.h: Remove unused/dead signal definitions

Change-Id: Iba5be82e11fa1d5e5514bc86d8ec23cda24ae4c9
Related: OS#2528
---
M include/osmocom/msc/signal.h
1 file changed, 0 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/57/6057/1

diff --git a/include/osmocom/msc/signal.h b/include/osmocom/msc/signal.h
index 29b6a59..e854a64 100644
--- a/include/osmocom/msc/signal.h
+++ b/include/osmocom/msc/signal.h
@@ -37,8 +37,6 @@
SS_SMS,
SS_SUBSCR,
SS_SCALL,
-   SS_MSC,
-   SS_CCCH,
 };
 
 /* SS_PAGING signals */
@@ -100,18 +98,6 @@
struct gsm_sms *sms;
/* int paging result. Only the ones with > 0 */
int paging_result;
-};
-
-/* MSC signals */
-enum signal_msc {
-   S_MSC_LOST,
-   S_MSC_CONNECTED,
-   S_MSC_AUTHENTICATED,
-};
-
-struct bsc_msc_data;
-struct msc_signal_data {
-   struct bsc_msc_data *data;
 };
 
 #endif

-- 
To view, visit https://gerrit.osmocom.org/6057
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba5be82e11fa1d5e5514bc86d8ec23cda24ae4c9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-msc[master]: remove unused ipaccess.h

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6054

remove unused ipaccess.h

Change-Id: Ibee159a119a1cce2b3fcbdabf3491673aed4ea95
Related: OS#2528
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/ipaccess.h
2 files changed, 0 insertions(+), 53 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/54/6054/1

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index cb19186..0adc746 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -18,7 +18,6 @@
gsm_data_shared.h \
gsm_subscriber.h \
gsup_client.h \
-   ipaccess.h \
iucs.h \
iucs_ranap.h \
iu_dummy.h \
diff --git a/include/osmocom/msc/ipaccess.h b/include/osmocom/msc/ipaccess.h
deleted file mode 100644
index 82e89c2..000
--- a/include/osmocom/msc/ipaccess.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#ifndef _IPACCESS_H
-#define _IPACCESS_H
-
-#include 
-#include "gsm_subscriber.h"
-#include 
-#include 
-#include 
-
-struct ipac_msgt_sccp_state {
-   uint8_t src_ref[3];
-   uint8_t dst_ref[3];
-   uint8_t trans_id;
-   uint8_t invoke_id;
-   charimsi[GSM23003_IMSI_MAX_DIGITS+1];
-   uint8_t data[0];
-} __attribute__((packed));
-
-/*
- * @add_remove 0 for remove, 1 for add, 3 to asK
- * @nr_lacs Number of extra lacs inside this package
- * @lac One lac entry
- */
-struct ipac_ext_lac_cmd {
-   uint8_t add_remove;
-   uint8_t nr_extra_lacs;
-   uint16_t lac;
-   uint8_t data[0];
-} __attribute__((packed));
-
-void ipaccess_drop_oml(struct gsm_bts *bts);
-void ipaccess_drop_rsl(struct gsm_bts_trx *trx);
-
-struct sdp_header_item {
-   struct sdp_header_entry header_entry;
-   struct llist_head entry;
-   off_t absolute_offset;
-};
-
-struct sdp_header {
-   struct sdp_firmware firmware_info;
-
-   /* for more_magic a list of sdp_header_entry_list */
-   struct llist_head header_list;
-
-   /* the entry of the sdp_header */
-   struct llist_head entry;
-};
-
-int ipaccess_analyze_file(int fd, const unsigned int st_size, const unsigned 
base_offset, struct llist_head *list);
-
-#endif /* _IPACCESS_H */

-- 
To view, visit https://gerrit.osmocom.org/6054
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibee159a119a1cce2b3fcbdabf3491673aed4ea95
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-pcu[master]: Move PDCH-related functions into separate file

2018-01-24 Thread Max

Review at  https://gerrit.osmocom.org/6053

Move PDCH-related functions into separate file

The PDCH class and corresponding functions are rather self-contained and
independent from BTS implementation. Let's move them into separate file
to make bts.cpp more manageable. As additional benefit it allow us to
somewhat untangle all the different cross-dependent includes.

Change-Id: Ie05e25361e6741a81b024679f9675c98d4923683
Related: OS#1539
---
M src/Makefile.am
M src/bts.cpp
M src/bts.h
M src/gprs_bssgp_pcu.cpp
M src/gprs_bssgp_pcu.h
M src/gprs_ms.h
M src/gprs_rlcmac.cpp
M src/gprs_rlcmac_meas.cpp
M src/gprs_rlcmac_sched.cpp
M src/gprs_rlcmac_ts_alloc.cpp
M src/pcu_l1_if.cpp
M src/pcu_vty_functions.cpp
A src/pdch.cpp
A src/pdch.h
M src/sba.cpp
M src/sba.h
16 files changed, 1,123 insertions(+), 1,026 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/53/6053/1

diff --git a/src/Makefile.am b/src/Makefile.am
index 7d2a62e..b2f64f2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -54,6 +54,7 @@
tbf_ul.cpp \
tbf_dl.cpp \
bts.cpp \
+   pdch.cpp \
poll_controller.cpp \
encoding.cpp \
sba.cpp \
@@ -85,6 +86,7 @@
mslot_class.h \
tbf.h \
bts.h \
+   pdch.h \
poll_controller.h \
encoding.h \
sba.h \
diff --git a/src/bts.cpp b/src/bts.cpp
index 94354f2..3de9509 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -25,7 +25,7 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
 #include 
 
@@ -846,792 +846,6 @@
return ms;
 }
 
-/*
- * PDCH code below. TODO: move to a separate file
- */
-
-void gprs_rlcmac_pdch::enable()
-{
-   /* TODO: Check if there are still allocated resources.. */
-   INIT_LLIST_HEAD(&paging_list);
-   m_is_enabled = 1;
-}
-
-void gprs_rlcmac_pdch::disable()
-{
-   /* TODO.. kick free_resources once we know the TRX/TS we are on */
-   m_is_enabled = 0;
-}
-
-void gprs_rlcmac_pdch::free_resources()
-{
-   struct gprs_rlcmac_paging *pag;
-
-   /* we are not enabled. there should be no resources */
-   if (!is_enabled())
-   return;
-
-   /* kick all TBF on slot */
-   gprs_rlcmac_tbf::free_all(this);
-
-   /* flush all pending paging messages */
-   while ((pag = dequeue_paging()))
-   talloc_free(pag);
-
-   trx->bts->sba()->free_resources(this);
-}
-
-struct gprs_rlcmac_paging *gprs_rlcmac_pdch::dequeue_paging()
-{
-   struct gprs_rlcmac_paging *pag;
-
-   if (llist_empty(&paging_list))
-   return NULL;
-   pag = llist_entry(paging_list.next, struct gprs_rlcmac_paging, list);
-   llist_del(&pag->list);
-
-   return pag;
-}
-
-struct msgb *gprs_rlcmac_pdch::packet_paging_request()
-{
-   struct gprs_rlcmac_paging *pag;
-   struct msgb *msg;
-   unsigned wp = 0, len;
-
-   /* no paging, no message */
-   pag = dequeue_paging();
-   if (!pag)
-   return NULL;
-
-   LOGP(DRLCMAC, LOGL_DEBUG, "Scheduling paging\n");
-
-   /* alloc message */
-   msg = msgb_alloc(23, "pag ctrl block");
-   if (!msg) {
-   talloc_free(pag);
-   return NULL;
-   }
-   bitvec *pag_vec = bitvec_alloc(23, tall_pcu_ctx);
-   if (!pag_vec) {
-   msgb_free(msg);
-   talloc_free(pag);
-   return NULL;
-   }
-   wp = Encoding::write_packet_paging_request(pag_vec);
-
-   /* loop until message is full */
-   while (pag) {
-   /* try to add paging */
-   if ((pag->identity_lv[1] & 0x07) == 4) {
-   /* TMSI */
-   LOGP(DRLCMAC, LOGL_DEBUG, "- TMSI=0x%08x\n",
-   ntohl(*((uint32_t *)(pag->identity_lv + 1;
-   len = 1 + 1 + 1 + 32 + 2 + 1;
-   if (pag->identity_lv[0] != 5) {
-   LOGP(DRLCMAC, LOGL_ERROR, "TMSI paging with "
-   "MI != 5 octets!\n");
-   goto continue_next;
-   }
-   } else {
-   /* MI */
-   LOGP(DRLCMAC, LOGL_DEBUG, "- MI=%s\n",
-   osmo_hexdump(pag->identity_lv + 1,
-   pag->identity_lv[0]));
-   len = 1 + 1 + 1 + 4 + (pag->identity_lv[0]<<3) + 2 + 1;
-   if (pag->identity_lv[0] > 8) {
-   LOGP(DRLCMAC, LOGL_ERROR, "Paging with "
-   "MI > 8 octets!\n");
-   goto continue_next;
-   }
-   }
-   if (wp + len > 184) {
-   LOGP(DRLCMAC, LOGL_DEBUG, "- Does not fit, so schedule "
-   "next time\n");
-   /* put back paging record, because does

osmo-msc[master]: WIP: VTY: Add 'show connections' and 'show transactions' com...

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review-2

WIP

-- 
To view, visit https://gerrit.osmocom.org/6050
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1c457c1eac20188f67b8379a36cfda3a085fcef4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] libusrp[master]: build: Link libusrp_la also to boost_system

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: build: Link libusrp_la also to boost_system
..


build: Link libusrp_la also to boost_system

Change-Id: I184214c37251dde0ea9bd05f4a4cebfed35a8d9f
---
M host/lib/Makefile.am
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified
  roox: Verified



diff --git a/host/lib/Makefile.am b/host/lib/Makefile.am
index 40c59f2..a0de559 100644
--- a/host/lib/Makefile.am
+++ b/host/lib/Makefile.am
@@ -29,6 +29,7 @@
 libusrp_la_common_LIBADD = \
$(USB_LIBS) \
$(BOOST_THREAD_LIB) \
+   $(BOOST_SYSTEM_LIB) \
../misc/libmisc.la
 
 AM_CPPFLAGS = $(common_INCLUDES) $(BOOST_CPPFLAGS) $(WITH_INCLUDES)

-- 
To view, visit https://gerrit.osmocom.org/6002
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I184214c37251dde0ea9bd05f4a4cebfed35a8d9f
Gerrit-PatchSet: 1
Gerrit-Project: libusrp
Gerrit-Branch: master
Gerrit-Owner: roox 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: roox 


[PATCH] osmo-msc[master]: Massive removal of unused code/structs/headers

2018-01-24 Thread Harald Welte
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/6051

to look at the new patch set (#3).

Massive removal of unused code/structs/headers

osmo-msc still had large amounts of dead code that came along from
openbsc.git.  This commit removes a lot of it, mostly stuff relevant
only to the BSC side of things (or even GPRS).

Change-Id: I247def85da2dc3ec461389fb74414a0d964e7e3c
Related: OS#2528
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/abis_nm.h
D include/osmocom/msc/abis_om2000.h
D include/osmocom/msc/abis_rsl.h
D include/osmocom/msc/arfcn_range_encode.h
M include/osmocom/msc/bsc_api.h
D include/osmocom/msc/bsc_msg_filter.h
D include/osmocom/msc/chan_alloc.h
D include/osmocom/msc/common_bsc.h
D include/osmocom/msc/crc24.h
D include/osmocom/msc/e1_config.h
M include/osmocom/msc/gsm_04_08.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_data_shared.h
M include/osmocom/msc/gsm_subscriber.h
D include/osmocom/msc/handover.h
D include/osmocom/msc/handover_decision.h
D include/osmocom/msc/meas_rep.h
D include/osmocom/msc/misdn.h
D include/osmocom/msc/network_listen.h
D include/osmocom/msc/osmo_bsc.h
D include/osmocom/msc/osmo_bsc_reset.h
D include/osmocom/msc/osmo_bsc_sigtran.h
D include/osmocom/msc/osmux.h
D include/osmocom/msc/rs232.h
D include/osmocom/msc/rtp_proxy.h
M include/osmocom/msc/signal.h
D include/osmocom/msc/slhc.h
D include/osmocom/msc/system_information.h
D include/osmocom/msc/trau_mux.h
D include/osmocom/msc/trau_upqueue.h
M include/osmocom/msc/vty.h
M src/libcommon-cs/a_reset.c
M src/libcommon/Makefile.am
M src/libcommon/common_vty.c
M src/libcommon/gsm_data.c
D src/libcommon/gsm_data_shared.c
M src/libcommon/talloc_ctx.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/sms_queue.c
M src/libmsc/vty_interface_layer3.c
M src/osmo-msc/msc_main.c
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_tests.c
52 files changed, 9 insertions(+), 3,552 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/51/6051/3

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 82e8207..cb19186 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -1,24 +1,15 @@
 noinst_HEADERS = \
-   abis_nm.h \
-   abis_om2000.h \
-   abis_rsl.h \
a_iface.h \
a_iface_bssap.h \
-   arfcn_range_encode.h \
auth.h \
bsc_api.h \
bsc_msc.h \
-   bsc_msg_filter.h \
bsc_rll.h \
-   chan_alloc.h \
common.h \
-   common_bsc.h \
common_cs.h \
-   crc24.h \
ctrl.h \
db.h \
debug.h \
-   e1_config.h \
gsm_04_08.h \
gsm_04_11.h \
gsm_04_14.h \
@@ -27,39 +18,25 @@
gsm_data_shared.h \
gsm_subscriber.h \
gsup_client.h \
-   handover.h \
-   handover_decision.h \
ipaccess.h \
iucs.h \
iucs_ranap.h \
iu_dummy.h \
-   meas_rep.h \
-   misdn.h \
mncc.h \
mncc_int.h \
msc_ifaces.h \
-   network_listen.h \
oap_client.h \
openbscdefines.h \
-   osmo_bsc.h \
a_reset.h \
osmo_msc.h \
-   osmo_bsc_sigtran.h \
bsc_msc_data.h \
-   osmux.h \
rrlp.h \
-   rs232.h \
-   rtp_proxy.h \
signal.h \
silent_call.h \
-   slhc.h \
smpp.h \
sms_queue.h \
socket.h \
-   system_information.h \
transaction.h \
-   trau_mux.h \
-   trau_upqueue.h \
ussd.h \
vlr.h \
vty.h \
diff --git a/include/osmocom/msc/abis_nm.h b/include/osmocom/msc/abis_nm.h
deleted file mode 100644
index 2581962..000
--- a/include/osmocom/msc/abis_nm.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* GSM Network Management messages on the A-bis interface 
- * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */
-
-/* (C) 2008-2009 by Harald Welte 
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#ifndef _NM_H
-#define _NM_H
-
-#include 
-#include 
-#include 
-
-#include 
-
-/

[PATCH] osmo-msc[master]: jenkins.sh: Don't depend on osmo-ggsn

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6052

jenkins.sh: Don't depend on osmo-ggsn

There's nothing GPRS related left in osmo-msc, and hence no reason
why we should build osmo-ggsn as a build dependency.

Change-Id: I096f63e471dc8fdbd42a78f67d433f61b830615b
---
M contrib/jenkins.sh
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/52/6052/1

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index e4f90e6..d80422d 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -29,7 +29,6 @@
 osmo-build-dep.sh libosmo-netif
 osmo-build-dep.sh libosmo-sccp
 PARALLEL_MAKE="" osmo-build-dep.sh libsmpp34
-osmo-build-dep.sh osmo-ggsn
 osmo-build-dep.sh osmo-mgw
 
 if [ "x$IU" = "x--enable-iu" ]; then

-- 
To view, visit https://gerrit.osmocom.org/6052
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I096f63e471dc8fdbd42a78f67d433f61b830615b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-msc[master]: Massive removal of unused code/structs/headers

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6051

Massive removal of unused code/structs/headers

osmo-msc still had large amounts of dead code that came along from
openbsc.git.  This commit removes a lot of it, mostly stuff relevant
only to the BSC side of things (or even GPRS).

Change-Id: I247def85da2dc3ec461389fb74414a0d964e7e3c
Related: OS#2528
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/abis_nm.h
D include/osmocom/msc/abis_om2000.h
D include/osmocom/msc/abis_rsl.h
D include/osmocom/msc/arfcn_range_encode.h
M include/osmocom/msc/bsc_api.h
D include/osmocom/msc/bsc_msg_filter.h
D include/osmocom/msc/chan_alloc.h
D include/osmocom/msc/common_bsc.h
D include/osmocom/msc/crc24.h
D include/osmocom/msc/e1_config.h
M include/osmocom/msc/gsm_04_08.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_data_shared.h
M include/osmocom/msc/gsm_subscriber.h
D include/osmocom/msc/handover.h
D include/osmocom/msc/handover_decision.h
D include/osmocom/msc/meas_rep.h
D include/osmocom/msc/misdn.h
D include/osmocom/msc/network_listen.h
D include/osmocom/msc/osmo_bsc.h
D include/osmocom/msc/osmo_bsc_reset.h
D include/osmocom/msc/osmo_bsc_sigtran.h
D include/osmocom/msc/osmux.h
D include/osmocom/msc/rs232.h
D include/osmocom/msc/rtp_proxy.h
M include/osmocom/msc/signal.h
D include/osmocom/msc/slhc.h
D include/osmocom/msc/system_information.h
D include/osmocom/msc/trau_mux.h
D include/osmocom/msc/trau_upqueue.h
M include/osmocom/msc/vty.h
M src/libcommon-cs/a_reset.c
M src/libcommon/Makefile.am
M src/libcommon/common_vty.c
M src/libcommon/gsm_data.c
D src/libcommon/gsm_data_shared.c
M src/libcommon/talloc_ctx.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/sms_queue.c
M src/libmsc/vty_interface_layer3.c
M src/osmo-msc/msc_main.c
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_tests.c
52 files changed, 7 insertions(+), 3,550 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/51/6051/1

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 82e8207..cb19186 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -1,24 +1,15 @@
 noinst_HEADERS = \
-   abis_nm.h \
-   abis_om2000.h \
-   abis_rsl.h \
a_iface.h \
a_iface_bssap.h \
-   arfcn_range_encode.h \
auth.h \
bsc_api.h \
bsc_msc.h \
-   bsc_msg_filter.h \
bsc_rll.h \
-   chan_alloc.h \
common.h \
-   common_bsc.h \
common_cs.h \
-   crc24.h \
ctrl.h \
db.h \
debug.h \
-   e1_config.h \
gsm_04_08.h \
gsm_04_11.h \
gsm_04_14.h \
@@ -27,39 +18,25 @@
gsm_data_shared.h \
gsm_subscriber.h \
gsup_client.h \
-   handover.h \
-   handover_decision.h \
ipaccess.h \
iucs.h \
iucs_ranap.h \
iu_dummy.h \
-   meas_rep.h \
-   misdn.h \
mncc.h \
mncc_int.h \
msc_ifaces.h \
-   network_listen.h \
oap_client.h \
openbscdefines.h \
-   osmo_bsc.h \
a_reset.h \
osmo_msc.h \
-   osmo_bsc_sigtran.h \
bsc_msc_data.h \
-   osmux.h \
rrlp.h \
-   rs232.h \
-   rtp_proxy.h \
signal.h \
silent_call.h \
-   slhc.h \
smpp.h \
sms_queue.h \
socket.h \
-   system_information.h \
transaction.h \
-   trau_mux.h \
-   trau_upqueue.h \
ussd.h \
vlr.h \
vty.h \
diff --git a/include/osmocom/msc/abis_nm.h b/include/osmocom/msc/abis_nm.h
deleted file mode 100644
index 2581962..000
--- a/include/osmocom/msc/abis_nm.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* GSM Network Management messages on the A-bis interface 
- * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */
-
-/* (C) 2008-2009 by Harald Welte 
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#ifndef _NM_H
-#define _NM_H
-
-#include 
-#include 
-#include 
-
-#include 
-
-/* max number of attributes represented as 3GPP TS 52.021 §9.4.62 SW 
Description array */
-#define MAX_

[PATCH] osmo-msc[master]: WIP: VTY: Add 'show connections' and 'show transactions' com...

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6050

WIP: VTY: Add 'show connections' and 'show transactions' commands

It is quite important to have some way of runtime state introspection
about the major objects inside osmo-msc.  This patch adds some basic
capabilities to dump the most important information about
subscriber_connections and transactions (like calls/sms).

OsmoMSC> show connection
--ConnId Subscriber RAN --LAC Use --Tokens CSA A5 State
0001IMSI:262426   A23   1 0004 --- /0 
SUBSCR_CONN_S_COMMUNICATING

Change-Id: I1c457c1eac20188f67b8379a36cfda3a085fcef4
---
M src/libmsc/vty_interface_layer3.c
1 file changed, 112 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/50/6050/1

diff --git a/src/libmsc/vty_interface_layer3.c 
b/src/libmsc/vty_interface_layer3.c
index dbd826d..4f59554 100644
--- a/src/libmsc/vty_interface_layer3.c
+++ b/src/libmsc/vty_interface_layer3.c
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -58,8 +59,102 @@
 
 extern struct gsm_network *gsmnet_from_vty(struct vty *v);
 
+static void vty_conn_hdr(struct vty *vty)
+{
+   vty_out(vty, "--ConnId Subscriber RAN --LAC Use --Tokens 
CSA A5 State%s",
+   VTY_NEWLINE);
+}
+
+static void vty_dump_one_conn(struct vty *vty, const struct 
gsm_subscriber_connection *conn)
+{
+   vty_out(vty, "%08x %22s %3s %5u %3u %08x %c%c%c /%1u %27s %s",
+   conn->a.conn_id,
+   conn->vsub ? vlr_subscr_name(conn->vsub) : "-",
+   conn->via_ran == RAN_UTRAN_IU ? "Iu" : "A",
+   conn->lac,
+   conn->use_count,
+   conn->use_tokens,
+   conn->received_cm_service_request ? 'C' : '-',
+   conn->sec_operation ? 'S' : '-',
+   conn->anch_operation ? 'A' : '-',
+   conn->encr.alg_id,
+   conn->conn_fsm ? osmo_fsm_inst_state_name(conn->conn_fsm) : "-",
+   VTY_NEWLINE);
+}
+
+DEFUN(show_msc_conn, show_msc_conn_cmd,
+   "show connection", SHOW_STR "Subscriber Connections\n")
+{
+   struct gsm_network *gsmnet = gsmnet_from_vty(vty);
+   struct gsm_subscriber_connection *conn;
+
+   vty_conn_hdr(vty);
+   llist_for_each_entry(conn, &gsmnet->subscr_conns, entry)
+   vty_dump_one_conn(vty, conn);
+
+   return CMD_SUCCESS;
+}
+
+static void vty_trans_hdr(struct vty *vty)
+{
+   vty_out(vty, "Subscriber --ConnId -P TI -CallRef Proto%s",
+   VTY_NEWLINE);
+}
+
+static const char *get_trans_proto_str(const struct gsm_trans *trans)
+{
+   static char buf[256];
+
+   switch (trans->protocol) {
+   case GSM48_PDISC_CC:
+   snprintf(buf, sizeof(buf), "%s %4u %4u",
+gsm48_cc_state_name(trans->cc.state),
+trans->cc.Tcurrent,
+trans->cc.T308_second);
+   break;
+   case GSM48_PDISC_SMS:
+   snprintf(buf, sizeof(buf), "%s %s",
+   gsm411_cp_state_name(trans->sms.smc_inst.cp_state),
+   gsm411_rp_state_name(trans->sms.smr_inst.rp_state));
+   break;
+   default:
+   buf[0] = '\0';
+   break;
+   }
+
+   return buf;
+}
+
+static void vty_dump_one_trans(struct vty *vty, const struct gsm_trans *trans)
+{
+   vty_out(vty, "%22s %08x %s %02u %08x %s%s",
+   trans->vsub ? vlr_subscr_name(trans->vsub) : "-",
+   trans->conn ? trans->conn->a.conn_id : 0,
+   gsm48_pdisc_name(trans->protocol),
+   trans->transaction_id,
+   trans->callref,
+   get_trans_proto_str(trans), VTY_NEWLINE);
+}
+
+DEFUN(show_msc_transaction, show_msc_transaction_cmd,
+   "show transaction", SHOW_STR "Transactions\n")
+{
+   struct gsm_network *gsmnet = gsmnet_from_vty(vty);
+   struct gsm_trans *trans;
+
+   vty_trans_hdr(vty);
+   llist_for_each_entry(trans, &gsmnet->trans_list, entry)
+   vty_dump_one_trans(vty, trans);
+
+   return CMD_SUCCESS;
+}
+
+
+
 static void subscr_dump_full_vty(struct vty *vty, struct vlr_subscr *vsub)
 {
+   struct gsm_network *gsmnet = gsmnet_from_vty(vty);
+   struct gsm_trans *trans;
int reqs;
struct llist_head *entry;
 
@@ -113,6 +208,21 @@
vty_out(vty, "Paging: %s paging for %d requests%s",
vsub->cs.is_paging ? "is" : "not", reqs, VTY_NEWLINE);
vty_out(vty, "Use count: %u%s", vsub->use_count, VTY_NEWLINE);
+
+   /* Connection */
+   if (vsub->msc_conn_ref) {
+   struct gsm_subscriber_connection *conn = vsub->msc_conn_ref;
+   vty_conn_hdr(vty);
+   vty_dump_one_conn(vty, conn);
+   }
+
+   /* Transactions */
+   vty_trans_hdr(vty);
+   llist_for_each_entry(trans, &gsmnet->trans_list, entry) {

[MERGED] osmo-msc[master]: remove traces of bsc_subscriber

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: remove traces of bsc_subscriber
..


remove traces of bsc_subscriber

Change-Id: I8672f0a76cb47595444a7ddbc4f34fc4ddaeb375
---
M include/osmocom/msc/gsm_data.h
M src/libcommon-cs/common_cs.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
14 files changed, 72 insertions(+), 91 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 1b0bff9..2b01a34 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -26,7 +26,6 @@
 
 struct mncc_sock_state;
 struct gsm_subscriber_group;
-struct bsc_subscr;
 struct vlr_instance;
 struct vlr_subscr;
 struct ranap_ue_conn_ctx;
@@ -144,9 +143,6 @@
/* The MS has opened the conn with a CM Service Request, and we shall
 * keep it open for an actual request (or until timeout). */
bool received_cm_service_request;
-
-   /* libbsc subscriber information (if available) */
-   struct bsc_subscr *bsub;
 
/* libmsc/libvlr subscriber information (if available) */
struct vlr_subscr *vsub;
@@ -445,14 +441,6 @@
 * OsmoMSC, this should be tied to the location area code (LAC). */
struct gsm_tz tz;
 
-   /* List of all struct bsc_subscr used in libbsc. This llist_head is
-* allocated so that the llist_head pointer itself can serve as a
-* talloc context (useful to not have to pass the entire gsm_network
-* struct to the bsc_subscr_* API, and for bsc_susbscr unit tests to
-* not require gsm_data.h). In an MSC-without-BSC environment, this
-* pointer is NULL to indicate absence of a bsc_subscribers list. */
-   struct llist_head *bsc_subscribers;
-
/* MSC: GSUP server address of the HLR */
const char *gsup_server_addr_str;
uint16_t gsup_server_port;
@@ -556,9 +544,6 @@
 
 int gsm48_ra_id_by_bts(uint8_t *buf, struct gsm_bts *bts);
 void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts);
-
-struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_lchan 
*lchan);
-void bsc_subscr_con_free(struct gsm_subscriber_connection *conn);
 
 struct gsm_subscriber_connection *msc_subscr_con_allocate(struct gsm_network 
*network);
 void msc_subscr_con_free(struct gsm_subscriber_connection *conn);
diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c
index 4748865..41c456e 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -66,9 +66,6 @@
INIT_LLIST_HEAD(&net->upqueue);
INIT_LLIST_HEAD(&net->subscr_conns);
 
-   net->bsc_subscribers = talloc_zero(net, struct llist_head);
-   INIT_LLIST_HEAD(net->bsc_subscribers);
-
/* init statistics */
net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0);
if (!net->msc_ctrs) {
diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err 
b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
index f6eef60..a161e3a 100644
--- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err
+++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
@@ -424,7 +424,7 @@
 = test_auth_use_twice_geran: SUCCESS
 
 full talloc report on 'msgb' (total  0 bytes in   1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 9
+talloc_total_blocks(tall_bsc_ctx) == 8
 
 = test_auth_use_twice_utran
 - Location Update request causes a GSUP Send Auth Info request to HLR
@@ -878,7 +878,7 @@
 = test_auth_use_twice_utran: SUCCESS
 
 full talloc report on 'msgb' (total  0 bytes in   1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 9
+talloc_total_blocks(tall_bsc_ctx) == 8
 
 = test_auth_use_infinitely_geran
 - Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1399,7 +1399,7 @@
 = test_auth_use_infinitely_geran: SUCCESS
 
 full talloc report on 'msgb' (total  0 bytes in   1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 9
+talloc_total_blocks(tall_bsc_ctx) == 8
 
 = test_auth_use_infinitely_utran
 - Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1954,7 +1954,7 @@
 = test_auth_use_infinitely_utran: SUCCESS
 
 full talloc report on 'msgb' (total  0 bytes in   1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 9
+talloc_total_blocks(tall_bsc_ctx) == 8
 
 = test_no_auth_reuse_geran
 - Location Update request causes a GSUP Send Auth Info request to HLR
@

osmo-msc[master]: debug: Remove code for filters that don't exist in OsmoMSC

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6049
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I05f991d1f5b7f89545521a73d79619bee4111094
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: remove unused paging.h and osmo_bsc_grace.h

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6048
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6af40f65f0634e49939906a3e50a41e0be246794
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-msc[master]: debug: Remove code for filters that don't exist in OsmoMSC

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: debug: Remove code for filters that don't exist in OsmoMSC
..


debug: Remove code for filters that don't exist in OsmoMSC

We don't have BSC or GPRS related logging filters here.
This is a leftover from the NITB->MSC split

Change-Id: I05f991d1f5b7f89545521a73d79619bee4111094
---
M include/osmocom/msc/gsm_04_08.h
M src/libcommon/debug.c
2 files changed, 0 insertions(+), 18 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/gsm_04_08.h b/include/osmocom/msc/gsm_04_08.h
index c99fc86..914b3e9 100644
--- a/include/osmocom/msc/gsm_04_08.h
+++ b/include/osmocom/msc/gsm_04_08.h
@@ -14,7 +14,6 @@
 struct gsm_subscriber_connection;
 struct amr_multirate_conf;
 struct amr_mode;
-struct bsc_subscr;
 
 #define GSM48_ALLOC_SIZE   2048
 #define GSM48_ALLOC_HEADROOM   256
diff --git a/src/libcommon/debug.c b/src/libcommon/debug.c
index 612e215..661eb66 100644
--- a/src/libcommon/debug.c
+++ b/src/libcommon/debug.c
@@ -200,26 +200,9 @@
 static int filter_fn(const struct log_context *ctx, struct log_target *tar)
 {
const struct vlr_subscr *vsub = ctx->ctx[LOG_CTX_VLR_SUBSCR];
-   const struct bsc_subscr *bsub = ctx->ctx[LOG_CTX_BSC_SUBSCR];
-   const struct gprs_nsvc *nsvc = ctx->ctx[LOG_CTX_GB_NSVC];
-   const struct gprs_nsvc *bvc = ctx->ctx[LOG_CTX_GB_BVC];
 
if ((tar->filter_map & (1 << LOG_FLT_VLR_SUBSCR)) != 0
&& vsub && vsub == tar->filter_data[LOG_FLT_VLR_SUBSCR])
-   return 1;
-
-   if ((tar->filter_map & (1 << LOG_FLT_BSC_SUBSCR)) != 0
-   && bsub && bsub == tar->filter_data[LOG_FLT_BSC_SUBSCR])
-   return 1;
-
-   /* Filter on the NS Virtual Connection */
-   if ((tar->filter_map & (1 << LOG_FLT_GB_NSVC)) != 0
-   && nsvc && (nsvc == tar->filter_data[LOG_FLT_GB_NSVC]))
-   return 1;
-
-   /* Filter on the NS Virtual Connection */
-   if ((tar->filter_map & (1 << LOG_FLT_GB_BVC)) != 0
-   && bvc && (bvc == tar->filter_data[LOG_FLT_GB_BVC]))
return 1;
 
return 0;

-- 
To view, visit https://gerrit.osmocom.org/6049
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I05f991d1f5b7f89545521a73d79619bee4111094
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-msc[master]: remove unused paging.h and osmo_bsc_grace.h

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: remove unused paging.h and osmo_bsc_grace.h
..


remove unused paging.h and osmo_bsc_grace.h

Change-Id: I6af40f65f0634e49939906a3e50a41e0be246794
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/osmo_bsc_grace.h
D include/osmocom/msc/paging.h
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/silent_call.c
M src/libmsc/transaction.c
8 files changed, 0 insertions(+), 118 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 61c915a..82e8207 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -42,13 +42,11 @@
oap_client.h \
openbscdefines.h \
osmo_bsc.h \
-   osmo_bsc_grace.h \
a_reset.h \
osmo_msc.h \
osmo_bsc_sigtran.h \
bsc_msc_data.h \
osmux.h \
-   paging.h \
rrlp.h \
rs232.h \
rtp_proxy.h \
diff --git a/include/osmocom/msc/osmo_bsc_grace.h 
b/include/osmocom/msc/osmo_bsc_grace.h
deleted file mode 100644
index 6232ffd..000
--- a/include/osmocom/msc/osmo_bsc_grace.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * (C) 2010-2013 by Holger Hans Peter Freyther 
- * (C) 2010-2013 by On-Waves
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#ifndef OSMO_BSC_GRACE_H
-#define OSMO_BSC_GRACE_H
-
-#include 
-#include 
-
-struct bsc_msc_data;
-
-int bsc_grace_allow_new_connection(struct gsm_network *net, struct gsm_bts 
*bts);
-int bsc_grace_paging_request(enum signal_rf rf_policy,
-struct bsc_subscr *subscr,
-int chan_needed,
-struct bsc_msc_data *msc);
-
-#endif
diff --git a/include/osmocom/msc/paging.h b/include/osmocom/msc/paging.h
deleted file mode 100644
index b856dcd..000
--- a/include/osmocom/msc/paging.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Paging helper and manager */
-/* (C) 2009 by Holger Hans Peter Freyther 
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#ifndef PAGING_H
-#define PAGING_H
-
-#include 
-#include 
-
-#include 
-#include 
-
-#include 
-
-/**
- * A pending paging request
- */
-struct gsm_paging_request {
-   /* list_head for list of all paging requests */
-   struct llist_head entry;
-   /* the subscriber which we're paging. Later gsm_paging_request
-* should probably become a part of the bsc_subsrc struct? */
-   struct bsc_subscr *bsub;
-   /* back-pointer to the BTS on which we are paging */
-   struct gsm_bts *bts;
-   /* what kind of channel type do we ask the MS to establish */
-   int chan_type;
-
-   /* Timer 3113: how long do we try to page? */
-   struct osmo_timer_list T3113;
-
-   /* How often did we ask the BTS to page? */
-   int attempts;
-
-   /* callback to be called in case paging completes */
-   gsm_cbfn *cbfn;
-   void *cbfn_param;
-};
-
-/* schedule paging request */
-int paging_request(struct gsm_network *network, struct bsc_subscr *bsub,
-  int type, gsm_cbfn *cbfn, void *data);
-int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub,
-  int type, gsm_cbfn *cbfn, void *data);
-
-/* stop paging requests */
-void paging_request_stop(struct llist_head *bts_list,
-struct gsm_bts *_bts, struct bsc_subscr *bsub,
-struct gsm_subscriber_connection *conn,
- 

osmo-msc[master]: remove traces of bsc_subscriber

2018-01-24 Thread Harald Welte

Patch Set 3: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6032
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8672f0a76cb47595444a7ddbc4f34fc4ddaeb375
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-msc[master]: debug: Remove code for filters that don't exist in OsmoMSC

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6049

debug: Remove code for filters that don't exist in OsmoMSC

We don't have BSC or GPRS related logging filters here.
This is a leftover from the NITB->MSC split

Change-Id: I05f991d1f5b7f89545521a73d79619bee4111094
---
M include/osmocom/msc/gsm_04_08.h
M src/libcommon/debug.c
2 files changed, 0 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/49/6049/1

diff --git a/include/osmocom/msc/gsm_04_08.h b/include/osmocom/msc/gsm_04_08.h
index c99fc86..914b3e9 100644
--- a/include/osmocom/msc/gsm_04_08.h
+++ b/include/osmocom/msc/gsm_04_08.h
@@ -14,7 +14,6 @@
 struct gsm_subscriber_connection;
 struct amr_multirate_conf;
 struct amr_mode;
-struct bsc_subscr;
 
 #define GSM48_ALLOC_SIZE   2048
 #define GSM48_ALLOC_HEADROOM   256
diff --git a/src/libcommon/debug.c b/src/libcommon/debug.c
index 612e215..661eb66 100644
--- a/src/libcommon/debug.c
+++ b/src/libcommon/debug.c
@@ -200,26 +200,9 @@
 static int filter_fn(const struct log_context *ctx, struct log_target *tar)
 {
const struct vlr_subscr *vsub = ctx->ctx[LOG_CTX_VLR_SUBSCR];
-   const struct bsc_subscr *bsub = ctx->ctx[LOG_CTX_BSC_SUBSCR];
-   const struct gprs_nsvc *nsvc = ctx->ctx[LOG_CTX_GB_NSVC];
-   const struct gprs_nsvc *bvc = ctx->ctx[LOG_CTX_GB_BVC];
 
if ((tar->filter_map & (1 << LOG_FLT_VLR_SUBSCR)) != 0
&& vsub && vsub == tar->filter_data[LOG_FLT_VLR_SUBSCR])
-   return 1;
-
-   if ((tar->filter_map & (1 << LOG_FLT_BSC_SUBSCR)) != 0
-   && bsub && bsub == tar->filter_data[LOG_FLT_BSC_SUBSCR])
-   return 1;
-
-   /* Filter on the NS Virtual Connection */
-   if ((tar->filter_map & (1 << LOG_FLT_GB_NSVC)) != 0
-   && nsvc && (nsvc == tar->filter_data[LOG_FLT_GB_NSVC]))
-   return 1;
-
-   /* Filter on the NS Virtual Connection */
-   if ((tar->filter_map & (1 << LOG_FLT_GB_BVC)) != 0
-   && bvc && (bvc == tar->filter_data[LOG_FLT_GB_BVC]))
return 1;
 
return 0;

-- 
To view, visit https://gerrit.osmocom.org/6049
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05f991d1f5b7f89545521a73d79619bee4111094
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-msc[master]: remove unused paging.h and osmo_bsc_grace.h

2018-01-24 Thread Harald Welte

Review at  https://gerrit.osmocom.org/6048

remove unused paging.h and osmo_bsc_grace.h

Change-Id: I6af40f65f0634e49939906a3e50a41e0be246794
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/osmo_bsc_grace.h
D include/osmocom/msc/paging.h
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/silent_call.c
M src/libmsc/transaction.c
8 files changed, 0 insertions(+), 118 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/48/6048/1

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 61c915a..82e8207 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -42,13 +42,11 @@
oap_client.h \
openbscdefines.h \
osmo_bsc.h \
-   osmo_bsc_grace.h \
a_reset.h \
osmo_msc.h \
osmo_bsc_sigtran.h \
bsc_msc_data.h \
osmux.h \
-   paging.h \
rrlp.h \
rs232.h \
rtp_proxy.h \
diff --git a/include/osmocom/msc/osmo_bsc_grace.h 
b/include/osmocom/msc/osmo_bsc_grace.h
deleted file mode 100644
index 6232ffd..000
--- a/include/osmocom/msc/osmo_bsc_grace.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * (C) 2010-2013 by Holger Hans Peter Freyther 
- * (C) 2010-2013 by On-Waves
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#ifndef OSMO_BSC_GRACE_H
-#define OSMO_BSC_GRACE_H
-
-#include 
-#include 
-
-struct bsc_msc_data;
-
-int bsc_grace_allow_new_connection(struct gsm_network *net, struct gsm_bts 
*bts);
-int bsc_grace_paging_request(enum signal_rf rf_policy,
-struct bsc_subscr *subscr,
-int chan_needed,
-struct bsc_msc_data *msc);
-
-#endif
diff --git a/include/osmocom/msc/paging.h b/include/osmocom/msc/paging.h
deleted file mode 100644
index b856dcd..000
--- a/include/osmocom/msc/paging.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Paging helper and manager */
-/* (C) 2009 by Holger Hans Peter Freyther 
- * All Rights Reserved
- *
- * 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 .
- *
- */
-
-#ifndef PAGING_H
-#define PAGING_H
-
-#include 
-#include 
-
-#include 
-#include 
-
-#include 
-
-/**
- * A pending paging request
- */
-struct gsm_paging_request {
-   /* list_head for list of all paging requests */
-   struct llist_head entry;
-   /* the subscriber which we're paging. Later gsm_paging_request
-* should probably become a part of the bsc_subsrc struct? */
-   struct bsc_subscr *bsub;
-   /* back-pointer to the BTS on which we are paging */
-   struct gsm_bts *bts;
-   /* what kind of channel type do we ask the MS to establish */
-   int chan_type;
-
-   /* Timer 3113: how long do we try to page? */
-   struct osmo_timer_list T3113;
-
-   /* How often did we ask the BTS to page? */
-   int attempts;
-
-   /* callback to be called in case paging completes */
-   gsm_cbfn *cbfn;
-   void *cbfn_param;
-};
-
-/* schedule paging request */
-int paging_request(struct gsm_network *network, struct bsc_subscr *bsub,
-  int type, gsm_cbfn *cbfn, void *data);
-int paging_request_bts(struct gsm_bts *bts, struct bsc_subscr *bsub,
-  int type, gsm_cbfn *cbfn, void *data);
-
-/* stop paging requests */
-void paging_request_stop(struct llist_head *bts_list,
-struct gsm_bts *_bts, struct bsc_subscr *bsub,
-struct gsm_subscriber_connection *conn,
-struct msgb *msg);
-
-/* update paging load */
-void paging_update_buffer_space(struct gsm_bts *bts, uint16_t);
-
-/* pending paging requests

[PATCH] osmo-msc[master]: remove traces of bsc_subscriber

2018-01-24 Thread Harald Welte
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/6032

to look at the new patch set (#3).

remove traces of bsc_subscriber

Change-Id: I8672f0a76cb47595444a7ddbc4f34fc4ddaeb375
---
M include/osmocom/msc/gsm_data.h
M src/libcommon-cs/common_cs.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
14 files changed, 72 insertions(+), 91 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/32/6032/3

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 1b0bff9..2b01a34 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -26,7 +26,6 @@
 
 struct mncc_sock_state;
 struct gsm_subscriber_group;
-struct bsc_subscr;
 struct vlr_instance;
 struct vlr_subscr;
 struct ranap_ue_conn_ctx;
@@ -144,9 +143,6 @@
/* The MS has opened the conn with a CM Service Request, and we shall
 * keep it open for an actual request (or until timeout). */
bool received_cm_service_request;
-
-   /* libbsc subscriber information (if available) */
-   struct bsc_subscr *bsub;
 
/* libmsc/libvlr subscriber information (if available) */
struct vlr_subscr *vsub;
@@ -445,14 +441,6 @@
 * OsmoMSC, this should be tied to the location area code (LAC). */
struct gsm_tz tz;
 
-   /* List of all struct bsc_subscr used in libbsc. This llist_head is
-* allocated so that the llist_head pointer itself can serve as a
-* talloc context (useful to not have to pass the entire gsm_network
-* struct to the bsc_subscr_* API, and for bsc_susbscr unit tests to
-* not require gsm_data.h). In an MSC-without-BSC environment, this
-* pointer is NULL to indicate absence of a bsc_subscribers list. */
-   struct llist_head *bsc_subscribers;
-
/* MSC: GSUP server address of the HLR */
const char *gsup_server_addr_str;
uint16_t gsup_server_port;
@@ -556,9 +544,6 @@
 
 int gsm48_ra_id_by_bts(uint8_t *buf, struct gsm_bts *bts);
 void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts);
-
-struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_lchan 
*lchan);
-void bsc_subscr_con_free(struct gsm_subscriber_connection *conn);
 
 struct gsm_subscriber_connection *msc_subscr_con_allocate(struct gsm_network 
*network);
 void msc_subscr_con_free(struct gsm_subscriber_connection *conn);
diff --git a/src/libcommon-cs/common_cs.c b/src/libcommon-cs/common_cs.c
index 4748865..41c456e 100644
--- a/src/libcommon-cs/common_cs.c
+++ b/src/libcommon-cs/common_cs.c
@@ -66,9 +66,6 @@
INIT_LLIST_HEAD(&net->upqueue);
INIT_LLIST_HEAD(&net->subscr_conns);
 
-   net->bsc_subscribers = talloc_zero(net, struct llist_head);
-   INIT_LLIST_HEAD(net->bsc_subscribers);
-
/* init statistics */
net->msc_ctrs = rate_ctr_group_alloc(net, &msc_ctrg_desc, 0);
if (!net->msc_ctrs) {
diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err 
b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
index f6eef60..a161e3a 100644
--- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err
+++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
@@ -424,7 +424,7 @@
 = test_auth_use_twice_geran: SUCCESS
 
 full talloc report on 'msgb' (total  0 bytes in   1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 9
+talloc_total_blocks(tall_bsc_ctx) == 8
 
 = test_auth_use_twice_utran
 - Location Update request causes a GSUP Send Auth Info request to HLR
@@ -878,7 +878,7 @@
 = test_auth_use_twice_utran: SUCCESS
 
 full talloc report on 'msgb' (total  0 bytes in   1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 9
+talloc_total_blocks(tall_bsc_ctx) == 8
 
 = test_auth_use_infinitely_geran
 - Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1399,7 +1399,7 @@
 = test_auth_use_infinitely_geran: SUCCESS
 
 full talloc report on 'msgb' (total  0 bytes in   1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 9
+talloc_total_blocks(tall_bsc_ctx) == 8
 
 = test_auth_use_infinitely_utran
 - Location Update request causes a GSUP Send Auth Info request to HLR
@@ -1954,7 +1954,7 @@
 = test_auth_use_infinitely_utran: SUCCESS
 
 full talloc report on 'msgb' (total  0 bytes in   1 blocks)
-talloc_total_blocks(tall_bsc_ctx) == 9
+talloc_total_blocks(tall_bsc_ctx) == 8
 
 = test_no_auth_reuse_geran
 - Location Update request causes a GSUP Send Auth Info request to HLR
@@ -2275,7 +2275,7 @@
 = test_no_auth_

[MERGED] osmo-msc[master]: msc_cipher_mode_compl: Handle CIPH MOD COMPL without L3 message

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc_cipher_mode_compl: Handle CIPH MOD COMPL without L3 message
..


msc_cipher_mode_compl: Handle CIPH MOD COMPL without L3 message

According to TS 44.008 Section 3.2.1.31, the "Layer 3 Message Contents"
IE of the BSSMAP Cipher Mode Complete is optional. The BSC may hence
inlcude that IE or not include it.

Without this patch, OsmoMSC is crashing if that IE was missing:

<000a> a_iface_bssap.c:699 Rx BSC DT: 00 03 55 2c 02
<000a> a_iface_bssap.c:629 Rx MSC DT1 BSSMAP CIPHER MODE COMPLETE
<001f> a_iface_bssap.c:91 Found A subscriber for conn_id 1
<000a> a_iface_bssap.c:415 BSC sends cipher mode complete (conn_id=1)
==5611== Invalid read of size 8
==5611==at 0x128D0F: msc_cipher_mode_compl (osmo_msc.c:159)
==5611==by 0x114F62: bssmap_rx_ciph_compl.isra.8 (a_iface_bssap.c:432)
==5611==by 0x113267: sccp_sap_up (a_iface.c:520)

Change-Id: I722f9b468b157b3736918f090daaa9489a6028ee
Closes: OS#2871
---
M src/libmsc/osmo_msc.c
1 file changed, 26 insertions(+), 26 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index 2a868a8..755f8aa 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -156,43 +156,43 @@
 void msc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
   struct msgb *msg, uint8_t alg_id)
 {
-   struct gsm48_hdr *gh = msgb_l3(msg);
-   unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
-   struct tlv_parsed tp;
-   uint8_t mi_type;
-   char imeisv[GSM48_MI_SIZE] = "";
struct vlr_ciph_result ciph_res = { .cause = VLR_CIPH_REJECT };
 
-   if (!gh) {
-   LOGP(DRR, LOGL_ERROR, "invalid: msgb without l3 header\n");
-   return;
-   }
-
if (!conn) {
-   LOGP(DRR, LOGL_ERROR,
-"invalid: rx Ciphering Mode Complete on NULL conn\n");
+   LOGP(DRR, LOGL_ERROR, "invalid: rx Ciphering Mode Complete on 
NULL conn\n");
return;
}
if (!conn->vsub) {
-   LOGP(DRR, LOGL_ERROR,
-"invalid: rx Ciphering Mode Complete for NULL subscr\n");
+   LOGP(DRR, LOGL_ERROR, "invalid: rx Ciphering Mode Complete for 
NULL subscr\n");
return;
}
 
-   DEBUGP(DRR, "%s: CIPHERING MODE COMPLETE\n",
-  vlr_subscr_name(conn->vsub));
+   DEBUGP(DRR, "%s: CIPHERING MODE COMPLETE\n", 
vlr_subscr_name(conn->vsub));
 
-   tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0);
+   if (msg) {
+   struct gsm48_hdr *gh = msgb_l3(msg);
+   unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
+   struct tlv_parsed tp;
+   uint8_t mi_type;
+   char imeisv[GSM48_MI_SIZE] = "";
 
-   /* bearer capability */
-   if (TLVP_PRESENT(&tp, GSM48_IE_MOBILE_ID)) {
-   mi_type = TLVP_VAL(&tp, GSM48_IE_MOBILE_ID)[0] & 
GSM_MI_TYPE_MASK;
-   if (mi_type == GSM_MI_TYPE_IMEISV
-   && TLVP_LEN(&tp, GSM48_IE_MOBILE_ID) > 0) {
-   gsm48_mi_to_string(imeisv, sizeof(imeisv),
-  TLVP_VAL(&tp, GSM48_IE_MOBILE_ID),
-  TLVP_LEN(&tp, GSM48_IE_MOBILE_ID));
-   ciph_res.imeisv = imeisv;
+   if (!gh) {
+   LOGP(DRR, LOGL_ERROR, "invalid: msgb without l3 
header\n");
+   return;
+   }
+
+   tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0);
+
+   /* bearer capability */
+   if (TLVP_PRESENT(&tp, GSM48_IE_MOBILE_ID)) {
+   mi_type = TLVP_VAL(&tp, GSM48_IE_MOBILE_ID)[0] & 
GSM_MI_TYPE_MASK;
+   if (mi_type == GSM_MI_TYPE_IMEISV
+   && TLVP_LEN(&tp, GSM48_IE_MOBILE_ID) > 0) {
+   gsm48_mi_to_string(imeisv, sizeof(imeisv),
+  TLVP_VAL(&tp, 
GSM48_IE_MOBILE_ID),
+  TLVP_LEN(&tp, 
GSM48_IE_MOBILE_ID));
+   ciph_res.imeisv = imeisv;
+   }
}
}
 

-- 
To view, visit https://gerrit.osmocom.org/6034
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I722f9b468b157b3736918f090daaa9489a6028ee
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-msc[master]: msc_cipher_mode_compl: Handle CIPH MOD COMPL without L3 message

2018-01-24 Thread Harald Welte

Patch Set 3: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6034
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I722f9b468b157b3736918f090daaa9489a6028ee
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-msc[master]: msc_cipher_mode_compl: Handle CIPH MOD COMPL without L3 message

2018-01-24 Thread Harald Welte
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/6034

to look at the new patch set (#3).

msc_cipher_mode_compl: Handle CIPH MOD COMPL without L3 message

According to TS 44.008 Section 3.2.1.31, the "Layer 3 Message Contents"
IE of the BSSMAP Cipher Mode Complete is optional. The BSC may hence
inlcude that IE or not include it.

Without this patch, OsmoMSC is crashing if that IE was missing:

<000a> a_iface_bssap.c:699 Rx BSC DT: 00 03 55 2c 02
<000a> a_iface_bssap.c:629 Rx MSC DT1 BSSMAP CIPHER MODE COMPLETE
<001f> a_iface_bssap.c:91 Found A subscriber for conn_id 1
<000a> a_iface_bssap.c:415 BSC sends cipher mode complete (conn_id=1)
==5611== Invalid read of size 8
==5611==at 0x128D0F: msc_cipher_mode_compl (osmo_msc.c:159)
==5611==by 0x114F62: bssmap_rx_ciph_compl.isra.8 (a_iface_bssap.c:432)
==5611==by 0x113267: sccp_sap_up (a_iface.c:520)

Change-Id: I722f9b468b157b3736918f090daaa9489a6028ee
Closes: OS#2871
---
M src/libmsc/osmo_msc.c
1 file changed, 26 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/34/6034/3

diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index 2a868a8..755f8aa 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -156,43 +156,43 @@
 void msc_cipher_mode_compl(struct gsm_subscriber_connection *conn,
   struct msgb *msg, uint8_t alg_id)
 {
-   struct gsm48_hdr *gh = msgb_l3(msg);
-   unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
-   struct tlv_parsed tp;
-   uint8_t mi_type;
-   char imeisv[GSM48_MI_SIZE] = "";
struct vlr_ciph_result ciph_res = { .cause = VLR_CIPH_REJECT };
 
-   if (!gh) {
-   LOGP(DRR, LOGL_ERROR, "invalid: msgb without l3 header\n");
-   return;
-   }
-
if (!conn) {
-   LOGP(DRR, LOGL_ERROR,
-"invalid: rx Ciphering Mode Complete on NULL conn\n");
+   LOGP(DRR, LOGL_ERROR, "invalid: rx Ciphering Mode Complete on 
NULL conn\n");
return;
}
if (!conn->vsub) {
-   LOGP(DRR, LOGL_ERROR,
-"invalid: rx Ciphering Mode Complete for NULL subscr\n");
+   LOGP(DRR, LOGL_ERROR, "invalid: rx Ciphering Mode Complete for 
NULL subscr\n");
return;
}
 
-   DEBUGP(DRR, "%s: CIPHERING MODE COMPLETE\n",
-  vlr_subscr_name(conn->vsub));
+   DEBUGP(DRR, "%s: CIPHERING MODE COMPLETE\n", 
vlr_subscr_name(conn->vsub));
 
-   tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0);
+   if (msg) {
+   struct gsm48_hdr *gh = msgb_l3(msg);
+   unsigned int payload_len = msgb_l3len(msg) - sizeof(*gh);
+   struct tlv_parsed tp;
+   uint8_t mi_type;
+   char imeisv[GSM48_MI_SIZE] = "";
 
-   /* bearer capability */
-   if (TLVP_PRESENT(&tp, GSM48_IE_MOBILE_ID)) {
-   mi_type = TLVP_VAL(&tp, GSM48_IE_MOBILE_ID)[0] & 
GSM_MI_TYPE_MASK;
-   if (mi_type == GSM_MI_TYPE_IMEISV
-   && TLVP_LEN(&tp, GSM48_IE_MOBILE_ID) > 0) {
-   gsm48_mi_to_string(imeisv, sizeof(imeisv),
-  TLVP_VAL(&tp, GSM48_IE_MOBILE_ID),
-  TLVP_LEN(&tp, GSM48_IE_MOBILE_ID));
-   ciph_res.imeisv = imeisv;
+   if (!gh) {
+   LOGP(DRR, LOGL_ERROR, "invalid: msgb without l3 
header\n");
+   return;
+   }
+
+   tlv_parse(&tp, &gsm48_att_tlvdef, gh->data, payload_len, 0, 0);
+
+   /* bearer capability */
+   if (TLVP_PRESENT(&tp, GSM48_IE_MOBILE_ID)) {
+   mi_type = TLVP_VAL(&tp, GSM48_IE_MOBILE_ID)[0] & 
GSM_MI_TYPE_MASK;
+   if (mi_type == GSM_MI_TYPE_IMEISV
+   && TLVP_LEN(&tp, GSM48_IE_MOBILE_ID) > 0) {
+   gsm48_mi_to_string(imeisv, sizeof(imeisv),
+  TLVP_VAL(&tp, 
GSM48_IE_MOBILE_ID),
+  TLVP_LEN(&tp, 
GSM48_IE_MOBILE_ID));
+   ciph_res.imeisv = imeisv;
+   }
}
}
 

-- 
To view, visit https://gerrit.osmocom.org/6034
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I722f9b468b157b3736918f090daaa9489a6028ee
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: msc: Add TC_cm_reest_req_reject: Expect CM RE-EST REQ to be ...

2018-01-24 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6044
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7d15b935caed2dacf39d66a33ff933a9b8c443d9
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_...

2018-01-24 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6042
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic90b4a0aa47821877a2d3566606b9c9dd5919968
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: msc: Add TC_cm_reest_req_reject: Expect CM RE-EST REQ to be ...

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: Add TC_cm_reest_req_reject: Expect CM RE-EST REQ to be 
rejected
..


msc: Add TC_cm_reest_req_reject: Expect CM RE-EST REQ to be rejected

Change-Id: I7d15b935caed2dacf39d66a33ff933a9b8c443d9
---
M library/L3_Templates.ttcn
M msc_tests/MSC_Tests.ttcn
2 files changed, 60 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index f23c8fa..7836555 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -129,6 +129,34 @@
}
 }
 
+template (value) CipheringKeySequenceNumberV ts_CKSN(integer key_seq) := {
+   keySequence := int2bit(key_seq, 3),
+   spare := '0'B
+}
+
+/* Send template for CM RE-ESTABLISH REQUEST */
+template (value) PDU_ML3_MS_NW ts_CM_REEST_REQ(integer cksn, MobileIdentityLV 
mi_lv) := {
+   discriminator := ''B, /* overwritten */
+   tiOrSkip := {
+   skipIndicator := ''B
+   },
+   msgs := {
+   mm := {
+   cMReEstablReq := {
+   messageType := '101000'B, /* overwritten */
+   nsd := '00'B,
+   cipheringKeySequenceNumber := ts_CKSN(cksn),
+   spare := ''B,
+   mobileStationClassmark2 := ts_CM2,
+   mobileIdentityLV := mi_lv,
+   locationAreaIdentification := omit,
+   deviceProperties := omit
+   }
+   }
+   }
+}
+
+
 template PDU_ML3_NW_MS tr_MT_simple(template BIT4 discr := ?) := {
discriminator := discr,
tiOrSkip := {
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index b318aa9..b1a7d1b 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -1002,13 +1002,44 @@
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_LCS, mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1;
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
setverdict(pass);
 }
 testcase TC_cm_serv_req_lcs_reject() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
+   f_vty_config(MSCVTY, "network", "authentication optional");
+   f_vty_config(MSCVTY, "msc", "assign-tmsi");
 
vc_conn := f_start_handler(refers(f_tc_cm_serv_req_lcs_reject), 
testcasename(), 21);
+   vc_conn.done;
+}
+
+/* CM Re-Establishment Request */
+private function f_tc_cm_reest_req_reject(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
+   g_pars := pars;
+
+   /* First perform location update to ensure subscriber is known */
+   f_perform_lu(false, true, true);
+
+   var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_REEST_REQ(0, mi));
+   f_bssap_compl_l3(l3_info);
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1;
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+   setverdict(pass);
+}
+testcase TC_cm_reest_req_reject() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+   f_vty_config(MSCVTY, "network", "authentication optional");
+   f_vty_config(MSCVTY, "msc", "assign-tmsi");
+
+   vc_conn := f_start_handler(refers(f_tc_cm_reest_req_reject), 
testcasename(), 22);
vc_conn.done;
 }
 
@@ -1049,6 +1080,7 @@
execute( TC_cm_serv_req_vgcs_reject() );
execute( TC_cm_serv_req_vbs_reject() );
execute( TC_cm_serv_req_lcs_reject() );
+   execute( TC_cm_reest_req_reject() );
 }
 
 

-- 
To view, visit https://gerrit.osmocom.org/6044
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d15b935caed2dacf39d66a33ff933a9b8c443d9
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: msc: TC_lu_imsi_auth_tmsi_encr_13_13

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: TC_lu_imsi_auth_tmsi_encr_13_13
..


msc: TC_lu_imsi_auth_tmsi_encr_13_13

Add a first test for encryption (cipher mode command/complete)

Change-Id: I8a8a5c55d87bb251896664679920b96f678673a0
---
M library/BSSMAP_Templates.ttcn
M msc_tests/BSC_ConnectionHandler.ttcn
M msc_tests/MSC_Tests.ttcn
3 files changed, 68 insertions(+), 4 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 5331505..33c370e 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -367,6 +367,14 @@
key := kc
 }
 
+template BSSMAP_IE_EncryptionInformation tr_BSSMAP_IE_EncrInfo(template OCT8 
kc := ?, template OCT1 algs := ?) := {
+   elementIdentifier := '0A'O,
+   lengthIndicator := ?,   /* overwritten */
+   permittedAlgorithms := algs,
+   key := kc
+}
+
+
 
 template (value) BSSMAP_IE_CircuitIdentityCode ts_BSSMAP_IE_CIC(uint11_t span, 
uint5_t ts) := {
elementIdentifier := '01'O, /* overwritten */
@@ -748,6 +756,37 @@
}
 }
 
+template PDU_BSSAP tr_BSSMAP_CipherModeCmd(template OCT1 alg, template OCT8 
key)
+modifies tr_BSSAP_BSSMAP := {
+   pdu := {
+   bssmap := {
+   cipherModeCommand := {
+   messageType := '53'O,
+   layer3HeaderInfo := *,
+   encryptionInformation := 
tr_BSSMAP_IE_EncrInfo(key, alg),
+   cipherResponseMode := *,
+   kC128 := *
+   }
+   }
+   }
+}
+
+template PDU_BSSAP ts_BSSMAP_CipherModeCompl(OCT1 alg)
+modifies ts_BSSAP_BSSMAP := {
+   pdu := {
+   bssmap := {
+   cipherModeComplete := {
+   messageType := '55'O,
+   layer3MessageContents := omit,
+   chosenEncryptionAlgorithm := {
+   elementIdentifier := '2C'O,
+   algorithmIdentifier := alg
+   }
+   }
+   }
+   }
+}
+
 template PDU_BSSAP tr_BSSMAP_CipherModeCompl(template OCT1 alg := ?) modifies 
tr_BSSAP_BSSMAP := {
pdu := {
bssmap := {
diff --git a/msc_tests/BSC_ConnectionHandler.ttcn 
b/msc_tests/BSC_ConnectionHandler.ttcn
index 330f25a..656fb4e 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -33,7 +33,8 @@
hexstring msisdn,
OCT4 tmsi optional,
BSSMAP_IE_ClassmarkInformationType2 cm2,
-   BSSMAP_IE_ClassmarkInformationType3 cm3 optional
+   BSSMAP_IE_ClassmarkInformationType3 cm3 optional,
+   octetstring kc optional
 };
 
 
@@ -161,10 +162,12 @@
return vec;
 }
 
-function f_perform_lu(boolean expect_auth, boolean expect_tmsi, boolean 
send_early_cm)
+function f_perform_lu(boolean expect_auth, boolean expect_tmsi, boolean 
send_early_cm,
+ boolean expect_ciph := false)
 runs on BSC_ConnHdlr {
var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
var PDU_DTAP_MT dtap_mt;
+   var AuthVector vec;
 
/* tell GSUP dispatcher to send this IMSI to us */
f_create_gsup_expect(hex2str(g_pars.imsi));
@@ -177,7 +180,7 @@
}
 
if (expect_auth) {
-   var AuthVector vec := f_gen_auth_vec_2g();
+   vec := f_gen_auth_vec_2g();
var GSUP_IE auth_tuple := 
valueof(ts_GSUP_IE_AuthTuple2G(vec.rand, vec.sres, vec.kc));
GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi));
GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple));
@@ -186,6 +189,12 @@
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MT_MM_AUTH_RESP_2G(vec.sres)));
}
 
+   if (expect_ciph) {
+   BSSAP.receive(tr_BSSMAP_CipherModeCmd(?, vec.kc));
+   g_pars.kc := vec.kc;
+   BSSAP.send(ts_BSSMAP_CipherModeCompl('02'O));
+   }
+
/* Expect MSC to perform LU with HLR */
GSUP.receive(tr_GSUP_UL_REQ(g_pars.imsi));
GSUP.send(ts_GSUP_ISD_REQ(g_pars.imsi, g_pars.msisdn));
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 367cd79..74d1b93 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -331,7 +331,8 @@
msisdn := f_gen_msisdn(imsi_suffix),
tmsi := omit,
cm2 := valueof(ts_CM2_default),
-   cm3 := omit
+   cm3 := omit,
+   kc := omit
};
 
vc_conn := BSC_ConnHdlr.create(id);
@@ -1087,6 +1088,21 @@
vc_conn.done;
 }
 
+private function f_tc_lu_imsi_auth_tmsi_enc

osmo-ttcn3-hacks[master]: msc: TC_lu_imsi_auth_tmsi_encr_13_13

2018-01-24 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6046
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8a8a5c55d87bb251896664679920b96f678673a0
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_...

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_TYPE
..


MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_TYPE

Change-Id: Ic90b4a0aa47821877a2d3566606b9c9dd5919968
---
M bsc-nat/BSC_MS_ConnectionHandler.ttcn
M bsc/MSC_ConnectionHandler.ttcn
M library/L3_Templates.ttcn
M msc_tests/BSC_ConnectionHandler.ttcn
M msc_tests/MSC_Tests.ttcn
5 files changed, 15 insertions(+), 12 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn 
b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
index 6efb15b..1f41434 100644
--- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn
+++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
@@ -58,7 +58,7 @@
 
 function f_gen_cl3(hexstring imsi) return PDU_BSSAP {
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(imsi));
-   var PDU_ML3_MS_NW l3 := valueof(ts_CM_SERV_REQ('0001'B, mi));
+   var PDU_ML3_MS_NW l3 := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));
var BSSMAP_IE_CellIdentifier cell_id := valueof(ts_CellID_LAC_CI(23, 
42));
var PDU_BSSAP bssap := valueof(ts_BSSMAP_ComplL3(cell_id, 
enc_PDU_ML3_MS_NW(l3)));
return bssap;
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 39b09f6..d1be0ef 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -87,7 +87,7 @@
 
 function f_create_chan_and_exp(TestHdlrParams pars) runs on MSC_ConnHdlr {
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(pars.imsi));
-   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi));
+   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, 
mi));
var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info);
 
/* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index c603b7b..f23c8fa 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -23,7 +23,10 @@
CM_TYPE_MO_CALL ('0001'B),
CM_TYPE_EMERG_CALL  ('0010'B),
CM_TYPE_MO_SMS  ('0100'B),
-   CM_TYPE_SS_ACT  ('1000'B)
+   CM_TYPE_SS_ACT  ('1000'B),
+   CM_TYPE_VGCS('1001'B),
+   CM_TYPE_VBS ('1010'B),
+   CM_TYPE_LCS ('1011'B)
 }
 
 
@@ -104,7 +107,7 @@
 };
 
 /* Send template for CM SERVICE REQUEST */
-template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(BIT4 serv_type, MobileIdentityLV 
mi_lv) := {
+template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(CmServiceType serv_type, 
MobileIdentityLV mi_lv) := {
discriminator := ''B, /* overwritten */
tiOrSkip := {
skipIndicator := ''B
@@ -114,7 +117,7 @@
cMServiceRequest := {
messageType := '00'B, /* overwritten */
nsd := '00'B,
-   cm_ServiceType := serv_type,
+   cm_ServiceType := int2bit(enum2int(serv_type), 
4),
cipheringKeySequenceNumber := { '000'B, '0'B },
mobileStationClassmark2 := ts_CM2,
mobileIdentity := mi_lv,
diff --git a/msc_tests/BSC_ConnectionHandler.ttcn 
b/msc_tests/BSC_ConnectionHandler.ttcn
index 25f8daf..330f25a 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -101,7 +101,7 @@
 /* helper function to fully establish a dedicated channel */
 function f_establish_fully(MobileIdentityLV mi, boolean expect_auth)
 runs on BSC_ConnHdlr {
-   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi));
+   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, 
mi));
var PDU_DTAP_MT dtap_mt;
 
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 5976b45..566999b 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -475,7 +475,7 @@
 
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var BSSMAP_IE_CellIdentifier cell_id := valueof(ts_CellId_CGI('262'H, 
'042'H, 23, 42));
-   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi));
+   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, 
mi));
 
f_create_gsup_expect(hex2str(g_pars.imsi));
 
@@ -858,7 +858,7 @@
 /* helper function for an emergency call. caller passes in mobile identity to 
use */
 private function f_emerg_call(MobileIdentityLV mi) runs on BSC_ConnHdlr {
 
-   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0010'B, mi));
+   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_EMERG_CALL, 
mi));
f_bssap_compl_l3(l3_info)

[MERGED] osmo-ttcn3-hacks[master]: msc: TC_lu_auth_2G_fail: Test auth failure in 2G auth

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: TC_lu_auth_2G_fail: Test auth failure in 2G auth
..


msc: TC_lu_auth_2G_fail: Test auth failure in 2G auth

Change-Id: I54ef4137c0b95658b1e844ac1bb13729f27fd0d1
---
M library/GSUP_Types.ttcn
M msc_tests/MSC_Tests.ttcn
2 files changed, 47 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index a8134eb..7f239ca 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -243,6 +243,9 @@
tr_GSUP(OSMO_GSUP_MSGT_INSERT_DATA_RESULT, {
tr_GSUP_IE_IMSI(imsi), * });
 
+template GSUP_PDU tr_GSUP_AUTH_FAIL_IND(hexstring imsi) :=
+   tr_GSUP(OSMO_GSUP_MSGT_AUTH_FAIL_REPORT, {
+   tr_GSUP_IE_IMSI(imsi), * });
 
 template GSUP_IE tr_GSUP_IE(template GSUP_IEI iei, template GSUP_IeValue val 
:= ?) := {
tag := iei,
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index b1a7d1b..367cd79 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -1043,6 +1043,50 @@
vc_conn.done;
 }
 
+/* Test LU (with authentication enabled), with wrong response from MS */
+private function f_tc_lu_auth_2G_fail(charstring id, BSC_ConnHdlrPars pars) 
runs on BSC_ConnHdlr {
+   g_pars := pars;
+
+   var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
+
+   /* tell GSUP dispatcher to send this IMSI to us */
+   f_create_gsup_expect(hex2str(g_pars.imsi));
+
+   /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
+   f_bssap_compl_l3(l3_lu);
+
+   /* Send Early Classmark, just for the fun of it */
+   BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
+
+   var AuthVector vec := f_gen_auth_vec_2g();
+   var GSUP_IE auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G(vec.rand, 
vec.sres, vec.kc));
+   GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi));
+   GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple));
+
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_AUTH_REQ(vec.rand)));
+   /* Send back wrong auth response */
+   BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MT_MM_AUTH_RESP_2G(''O)));
+
+   /* Expect GSUP AUTH FAIL REP to HLR */
+   GSUP.receive(tr_GSUP_AUTH_FAIL_IND(g_pars.imsi));
+
+   /* Expect LU REJECT with Cause == Illegal MS */
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej('03'O)));
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+   setverdict(pass);
+}
+testcase TC_lu_auth_2G_fail() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+   f_vty_config(MSCVTY, "network", "authentication required");
+   f_vty_config(MSCVTY, "msc", "assign-tmsi");
+
+   vc_conn := f_start_handler(refers(f_tc_lu_auth_2G_fail), 
testcasename(), 23);
+   vc_conn.done;
+}
+
 
 /* TODO:
* continue to send repeated MO signalling messages to keep channel open: 
does MSC tmeout?

-- 
To view, visit https://gerrit.osmocom.org/6045
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I54ef4137c0b95658b1e844ac1bb13729f27fd0d1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: msc: Wait for proper BSSAP connection clear after CM SERV REJ

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: Wait for proper BSSAP connection clear after CM SERV REJ
..


msc: Wait for proper BSSAP connection clear after CM SERV REJ

Change-Id: Ia8fc0e61c7f8f31ca4dd21a243e00ef688ff38c6
---
M msc_tests/MSC_Tests.ttcn
1 file changed, 14 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 566999b..b318aa9 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -908,6 +908,9 @@
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_EMERG_CALL, 
mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ('05'O)));
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
setverdict(pass);
 }
 testcase TC_emerg_call_imei_reject() runs on MTC_CT {
@@ -930,6 +933,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
f_vty_config(MSCVTY, "network", "authentication optional");
+   f_vty_config(MSCVTY, "msc", "assign-tmsi");
 
vc_conn := f_start_handler(refers(f_tc_emerg_call_imsi), 
testcasename(), 18);
vc_conn.done;
@@ -946,11 +950,16 @@
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_VGCS, mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1;
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
setverdict(pass);
 }
 testcase TC_cm_serv_req_vgcs_reject() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
+   f_vty_config(MSCVTY, "network", "authentication optional");
+   f_vty_config(MSCVTY, "msc", "assign-tmsi");
 
vc_conn := f_start_handler(refers(f_tc_cm_serv_req_vgcs_reject), 
testcasename(), 19);
vc_conn.done;
@@ -967,11 +976,16 @@
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_VBS, mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ(int2oct(32,1;
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
setverdict(pass);
 }
 testcase TC_cm_serv_req_vbs_reject() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
+   f_vty_config(MSCVTY, "network", "authentication optional");
+   f_vty_config(MSCVTY, "msc", "assign-tmsi");
 
vc_conn := f_start_handler(refers(f_tc_cm_serv_req_vbs_reject), 
testcasename(), 20);
vc_conn.done;

-- 
To view, visit https://gerrit.osmocom.org/6043
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8fc0e61c7f8f31ca4dd21a243e00ef688ff38c6
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: msc: TC_lu_auth_2G_fail: Test auth failure in 2G auth

2018-01-24 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6045
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54ef4137c0b95658b1e844ac1bb13729f27fd0d1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: msc: Wait for proper BSSAP connection clear after CM SERV REJ

2018-01-24 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6043
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia8fc0e61c7f8f31ca4dd21a243e00ef688ff38c6
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-ttcn3-hacks[master]: MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_...

2018-01-24 Thread Harald Welte
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/6042

to look at the new patch set (#2).

MSC_Tests: Use enum instead of magic numbers for CM_SERVICE_TYPE

Change-Id: Ic90b4a0aa47821877a2d3566606b9c9dd5919968
---
M bsc-nat/BSC_MS_ConnectionHandler.ttcn
M bsc/MSC_ConnectionHandler.ttcn
M library/L3_Templates.ttcn
M msc_tests/BSC_ConnectionHandler.ttcn
M msc_tests/MSC_Tests.ttcn
5 files changed, 15 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/42/6042/2

diff --git a/bsc-nat/BSC_MS_ConnectionHandler.ttcn 
b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
index 6efb15b..1f41434 100644
--- a/bsc-nat/BSC_MS_ConnectionHandler.ttcn
+++ b/bsc-nat/BSC_MS_ConnectionHandler.ttcn
@@ -58,7 +58,7 @@
 
 function f_gen_cl3(hexstring imsi) return PDU_BSSAP {
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(imsi));
-   var PDU_ML3_MS_NW l3 := valueof(ts_CM_SERV_REQ('0001'B, mi));
+   var PDU_ML3_MS_NW l3 := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, mi));
var BSSMAP_IE_CellIdentifier cell_id := valueof(ts_CellID_LAC_CI(23, 
42));
var PDU_BSSAP bssap := valueof(ts_BSSMAP_ComplL3(cell_id, 
enc_PDU_ML3_MS_NW(l3)));
return bssap;
diff --git a/bsc/MSC_ConnectionHandler.ttcn b/bsc/MSC_ConnectionHandler.ttcn
index 39b09f6..d1be0ef 100644
--- a/bsc/MSC_ConnectionHandler.ttcn
+++ b/bsc/MSC_ConnectionHandler.ttcn
@@ -87,7 +87,7 @@
 
 function f_create_chan_and_exp(TestHdlrParams pars) runs on MSC_ConnHdlr {
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(pars.imsi));
-   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi));
+   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, 
mi));
var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3_info);
 
/* call helper function for CHAN_RQD -> IMM ASS ->EST_IND */
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index c603b7b..f23c8fa 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -23,7 +23,10 @@
CM_TYPE_MO_CALL ('0001'B),
CM_TYPE_EMERG_CALL  ('0010'B),
CM_TYPE_MO_SMS  ('0100'B),
-   CM_TYPE_SS_ACT  ('1000'B)
+   CM_TYPE_SS_ACT  ('1000'B),
+   CM_TYPE_VGCS('1001'B),
+   CM_TYPE_VBS ('1010'B),
+   CM_TYPE_LCS ('1011'B)
 }
 
 
@@ -104,7 +107,7 @@
 };
 
 /* Send template for CM SERVICE REQUEST */
-template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(BIT4 serv_type, MobileIdentityLV 
mi_lv) := {
+template (value) PDU_ML3_MS_NW ts_CM_SERV_REQ(CmServiceType serv_type, 
MobileIdentityLV mi_lv) := {
discriminator := ''B, /* overwritten */
tiOrSkip := {
skipIndicator := ''B
@@ -114,7 +117,7 @@
cMServiceRequest := {
messageType := '00'B, /* overwritten */
nsd := '00'B,
-   cm_ServiceType := serv_type,
+   cm_ServiceType := int2bit(enum2int(serv_type), 
4),
cipheringKeySequenceNumber := { '000'B, '0'B },
mobileStationClassmark2 := ts_CM2,
mobileIdentity := mi_lv,
diff --git a/msc_tests/BSC_ConnectionHandler.ttcn 
b/msc_tests/BSC_ConnectionHandler.ttcn
index 25f8daf..330f25a 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -101,7 +101,7 @@
 /* helper function to fully establish a dedicated channel */
 function f_establish_fully(MobileIdentityLV mi, boolean expect_auth)
 runs on BSC_ConnHdlr {
-   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi));
+   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, 
mi));
var PDU_DTAP_MT dtap_mt;
 
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 5976b45..566999b 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -475,7 +475,7 @@
 
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
var BSSMAP_IE_CellIdentifier cell_id := valueof(ts_CellId_CGI('262'H, 
'042'H, 23, 42));
-   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0001'B, mi));
+   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_MO_CALL, 
mi));
 
f_create_gsup_expect(hex2str(g_pars.imsi));
 
@@ -858,7 +858,7 @@
 /* helper function for an emergency call. caller passes in mobile identity to 
use */
 private function f_emerg_call(MobileIdentityLV mi) runs on BSC_ConnHdlr {
 
-   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0010'B, mi));
+   var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ(CM_TYPE_EMERG_CALL, 
mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_ACC));
 
@@ -90

[MERGED] osmo-msc[master]: Properly reject CM Re-Establishment Request

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Properly reject CM Re-Establishment Request
..


Properly reject CM Re-Establishment Request

Even if we're not implementing CM re-establishment, we should give
the MS a clear indication that we don't do and follow the related
procedures of TS 24.008 by sending CM SERVICE REJECT.

Closes: OS#2869
Change-Id: I1c0473647295456fd635b8df6079ee48695dcf2e
---
M src/libmsc/gsm_04_08.c
1 file changed, 22 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index ea40a96..51eb1c0 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -740,6 +740,26 @@
return 0;
 }
 
+/* Receive a CM Re-establish Request */
+static int gsm48_rx_cm_reest_req(struct gsm_subscriber_connection *conn, 
struct msgb *msg)
+{
+   uint8_t mi_type;
+   char mi_string[GSM48_MI_SIZE];
+   struct gsm48_hdr *gh = msgb_l3(msg);
+
+   uint8_t classmark2_len = gh->data[1];
+   uint8_t *classmark2 = gh->data+2;
+   uint8_t mi_len = *(classmark2 + classmark2_len);
+   uint8_t *mi = (classmark2 + classmark2_len + 1);
+
+   gsm48_mi_to_string(mi_string, sizeof(mi_string), mi, mi_len);
+   mi_type = mi[0] & GSM_MI_TYPE_MASK;
+   DEBUGP(DMM, "<- CM RE-ESTABLISH REQUEST MI(%s)=%s\n", 
gsm48_mi_type_name(mi_type), mi_string);
+
+   /* we don't support CM call re-establishment */
+   return msc_gsm48_tx_mm_serv_rej(conn, 
GSM48_REJECT_SRV_OPT_NOT_SUPPORTED);
+}
+
 static int gsm48_rx_mm_imsi_detach_ind(struct gsm_subscriber_connection *conn, 
struct msgb *msg)
 {
struct gsm_network *network = conn->network;
@@ -1039,7 +1059,7 @@
rc = gsm48_rx_mm_imsi_detach_ind(conn, msg);
break;
case GSM48_MT_MM_CM_REEST_REQ:
-   DEBUGP(DMM, "CM REESTABLISH REQUEST: Not implemented\n");
+   rc = gsm48_rx_cm_reest_req(conn, msg);
break;
case GSM48_MT_MM_AUTH_RESP:
rc = gsm48_rx_mm_auth_resp(conn, msg);
@@ -3187,6 +3207,7 @@
switch (msg_type) {
case GSM48_MT_MM_LOC_UPD_REQUEST:
case GSM48_MT_MM_CM_SERV_REQ:
+   case GSM48_MT_MM_CM_REEST_REQ:
case GSM48_MT_MM_AUTH_RESP:
case GSM48_MT_MM_AUTH_FAIL:
case GSM48_MT_MM_ID_RESP:

-- 
To view, visit https://gerrit.osmocom.org/6033
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c0473647295456fd635b8df6079ee48695dcf2e
Gerrit-PatchSet: 4
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-msc[master]: Fix msc_vlr test results (.err) for new libosmocore GSM48_PD...

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Fix msc_vlr test results (.err) for new libosmocore GSM48_PDISC 
names
..


Fix msc_vlr test results (.err) for new libosmocore GSM48_PDISC names

In I8de7c01f9ea1d66c384e57449c4140186f5ce6c5, libosmocore introduced
shorter names in gsm48_pdisc_names, which has implications on the
expected test output

Change-Id: I4421872a0d609dd50a6b911b928aa5e111d1ad24
---
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
8 files changed, 346 insertions(+), 346 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/tests/msc_vlr/msc_vlr_test_authen_reuse.err 
b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
index fac9623..f6eef60 100644
--- a/tests/msc_vlr/msc_vlr_test_authen_reuse.err
+++ b/tests/msc_vlr/msc_vlr_test_authen_reuse.err
@@ -128,8 +128,8 @@
 DRLL subscr MSISDN:42342: Message not permitted for initial conn: unknown 0x33
 DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
 DRLL subscr MSISDN:42342: Message not permitted for initial conn: 
GSM48_MT_RR_SYSINFO_1
-DRLL Dispatching 04.08 message GSM48_PDISC_SMS:0x01 (0x9:0x1)
-DRLL subscr MSISDN:42342: Message not permitted for initial conn: 
GSM48_PDISC_SMS:0x01
+DRLL Dispatching 04.08 message SMS:0x01 (0x9:0x1)
+DRLL subscr MSISDN:42342: Message not permitted for initial conn: SMS:0x01
 - even though the TMSI is not acked, we can already find the subscr with it
 DREF VLR subscr MSISDN:42342 usage increases to: 2
   vsub != NULL == 1
@@ -252,16 +252,16 @@
 - a USSD request is serviced
   expecting USSD:
   Your extension is 42342
-  MSC <--RAN_GERAN_A-- MS: GSM48_PDISC_NC_SS:0x3b
+  MSC <--RAN_GERAN_A-- MS: NCSS:0x3b
 DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6)
-DRLL Dispatching 04.08 message GSM48_PDISC_NC_SS:0x3b (0xb:0x3b)
-DMM MSISDN:42342: rx msg GSM48_PDISC_NC_SS:0x3b: received_cm_service_request 
changes to false
+DRLL Dispatching 04.08 message NCSS:0x3b (0xb:0x3b)
+DMM MSISDN:42342: rx msg NCSS:0x3b: received_cm_service_request changes to 
false
 DMM Subscr_Conn(90170010650){SUBSCR_CONN_S_ACCEPTED}: Received Event 
SUBSCR_CONN_E_COMMUNICATING
 DMM Subscr_Conn(90170010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to 
SUBSCR_CONN_S_COMMUNICATING
 DMM USSD: Own number requested
 DMM MSISDN:42342: MSISDN = 42342
 DMSC msc_tx 43 bytes to MSISDN:42342 via RAN_GERAN_A
-- DTAP --RAN_GERAN_A--> MS: GSM48_PDISC_NC_SS:0x2a: 
8b2a1c27a225020100302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d273104d36a3c91a0d
+- DTAP --RAN_GERAN_A--> MS: NCSS:0x2a: 
8b2a1c27a225020100302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d273104d36a3c91a0d
 - DTAP matches expected message
 DMM Subscr_Conn(90170010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event 
SUBSCR_CONN_E_BUMP
 DMM Subscr_Conn(90170010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing 
conn
@@ -373,16 +373,16 @@
 - a USSD request is serviced
   expecting USSD:
   Your extension is 42342
-  MSC <--RAN_GERAN_A-- MS: GSM48_PDISC_NC_SS:0x3b
+  MSC <--RAN_GERAN_A-- MS: NCSS:0x3b
 DREF MSISDN:42342: MSC conn use + dtap == 2 (0x6)
-DRLL Dispatching 04.08 message GSM48_PDISC_NC_SS:0x3b (0xb:0x3b)
-DMM MSISDN:42342: rx msg GSM48_PDISC_NC_SS:0x3b: received_cm_service_request 
changes to false
+DRLL Dispatching 04.08 message NCSS:0x3b (0xb:0x3b)
+DMM MSISDN:42342: rx msg NCSS:0x3b: received_cm_service_request changes to 
false
 DMM Subscr_Conn(90170010650){SUBSCR_CONN_S_ACCEPTED}: Received Event 
SUBSCR_CONN_E_COMMUNICATING
 DMM Subscr_Conn(90170010650){SUBSCR_CONN_S_ACCEPTED}: state_chg to 
SUBSCR_CONN_S_COMMUNICATING
 DMM USSD: Own number requested
 DMM MSISDN:42342: MSISDN = 42342
 DMSC msc_tx 43 bytes to MSISDN:42342 via RAN_GERAN_A
-- DTAP --RAN_GERAN_A--> MS: GSM48_PDISC_NC_SS:0x2a: 
8b2a1c27a225020100302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d273104d36a3c91a0d
+- DTAP --RAN_GERAN_A--> MS: NCSS:0x2a: 
8b2a1c27a225020100302002013b301b04010f0416d9775d0e2ae3e965f73cfd7683d273104d36a3c91a0d
 - DTAP matches expected message
 DMM Subscr_Conn(90170010650){SUBSCR_CONN_S_COMMUNICATING}: Received Event 
SUBSCR_CONN_E_BUMP
 DMM Subscr_Conn(90170010650){SUBSCR_CONN_S_COMMUNICATING}: bump: releasing 
conn
@@ -566,8 +566,8 @@
 DRLL subscr MSISDN:42342: Message not permitted for initial conn: unknown 0x33
 DRLL Dispatching 04.08 message GSM48_MT_RR_SYSINFO_1 (0x6:0x19)
 DRLL subscr MSISDN:42342: Message not permitted for initial conn: 
GSM48_MT_RR_SYSINFO_1
-DRLL Dispatching 04.08 message GSM48_PDISC_SMS:0x01 (0x9:0x1)
-DRLL subscr MSISDN:42342: Message not permitted for initial conn: 
GSM48_PDIS

osmo-msc[master]: msc_cipher_mode_compl: Handle CIPH MOD COMPL without L3 message

2018-01-24 Thread Harald Welte

Patch Set 2: Code-Review-2

unrelated gsup_client change

-- 
To view, visit https://gerrit.osmocom.org/6034
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I722f9b468b157b3736918f090daaa9489a6028ee
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: msc_cipher_mode_compl: Handle CIPH MOD COMPL without L3 message

2018-01-24 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6034
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I722f9b468b157b3736918f090daaa9489a6028ee
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-msc[master]: Properly reject CM Re-Establishment Request

2018-01-24 Thread Harald Welte

Patch Set 4: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6033
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1c0473647295456fd635b8df6079ee48695dcf2e
Gerrit-PatchSet: 4
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: GSUP: Fix handling of odd-length IMSI and 0xF filler digit

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: GSUP: Fix handling of odd-length IMSI and 0xF filler digit
..


GSUP: Fix handling of odd-length IMSI and 0xF filler digit

Change-Id: I4e0a9f1236504ce6026c6e34fd97fda6fefa832c
---
M library/GSUP_Types.ttcn
M library/IPA_Emulation.ttcn
2 files changed, 24 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index 15560c7..a8134eb 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -138,6 +138,26 @@
 external function dec_GSUP_PDU(in octetstring msg) return GSUP_PDU
with { extension "prototype(convert) decode(RAW)" };
 
+function f_gsup_postprocess_decoded(inout GSUP_PDU gsup) {
+   if (gsup.ies[0].tag == OSMO_GSUP_IMSI_IE) {
+   /* if last digit is 'F', then there's an odd number of digits 
and we must strip the F */
+   var integer num_digits := lengthof(gsup.ies[0].val.imsi);
+   if (gsup.ies[0].val.imsi[num_digits-1] == 'F'H) {
+   gsup.ies[0].val.imsi := substr(gsup.ies[0].val.imsi, 0, 
num_digits-1);
+   }
+   }
+}
+
+function f_gsup_preprocess_encoded(inout GSUP_PDU gsup) {
+   if (ischosen(gsup.ies[0].val.imsi)) {
+   /* if number of digits is odd, add a 'F' as padding at the end 
*/
+   var integer num_digits := lengthof(gsup.ies[0].val.imsi);
+   if (num_digits rem 2 == 1) {
+   gsup.ies[0].val.imsi := gsup.ies[0].val.imsi & 'F'H;
+   }
+   }
+}
+
 
 template GSUP_IE ts_GSUP_IE_AuthTuple2G(octetstring rand, octetstring sres,
octetstring kc) := {
diff --git a/library/IPA_Emulation.ttcn b/library/IPA_Emulation.ttcn
index b40818f..b3e28e9 100644
--- a/library/IPA_Emulation.ttcn
+++ b/library/IPA_Emulation.ttcn
@@ -370,7 +370,9 @@
 }
 
 private function f_gsup_to_user(octetstring msg) runs on IPA_Emulation_CT {
-   IPA_GSUP_PORT.send(dec_GSUP_PDU(msg));
+   var GSUP_PDU gsup := dec_GSUP_PDU(msg);
+   f_gsup_postprocess_decoded(gsup);
+   IPA_GSUP_PORT.send(gsup);
 }
 
 private function f_mgcp_to_ud(octetstring payload) runs on IPA_Emulation_CT 
return ASP_IPA_Unitdata {
@@ -480,6 +482,7 @@
}
 
[] IPA_GSUP_PORT.receive(GSUP_PDU:?) -> value gsup_msg {
+   f_gsup_preprocess_encoded(gsup_msg);
payload := enc_GSUP_PDU(gsup_msg);
ipa_ud := valueof(t_ASP_IPA_UD(IPAC_PROTO_OSMO, 
payload, IPAC_PROTO_EXT_GSUP));
IPA_PORT.send(f_from_asp(g_ipa_conn_id, ipa_ud));

-- 
To view, visit https://gerrit.osmocom.org/6040
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e0a9f1236504ce6026c6e34fd97fda6fefa832c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-msc[master]: Fix msc_vlr test results (.err) for new libosmocore GSM48_PD...

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6047
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4421872a0d609dd50a6b911b928aa5e111d1ad24
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: MSC: Use VTY to enable/disable authentication + TMSI allocation

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: MSC: Use VTY to enable/disable authentication + TMSI allocation
..


MSC: Use VTY to enable/disable authentication + TMSI allocation

Change-Id: Ifaa0f119d37b18b804c563c045755cc23d509617
---
M msc_tests/MSC_Tests.cfg
M msc_tests/MSC_Tests.ttcn
M msc_tests/gen_links.sh
M msc_tests/regen_makefile.sh
4 files changed, 50 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc_tests/MSC_Tests.cfg b/msc_tests/MSC_Tests.cfg
index 2bd9dd2..ab8a2ff 100644
--- a/msc_tests/MSC_Tests.cfg
+++ b/msc_tests/MSC_Tests.cfg
@@ -10,16 +10,27 @@
 "MSC_Test-GSUP-IPA".FileMask := ERROR | WARNING;
 "MSC_Test-GSUP".FileMask := ERROR | WARNING;
 "IPA-CTRL-IPA".FileMask := ERROR | WARNING;
+mtc.FileMask := ERROR | WARNING;
 
 [TESTPORT_PARAMETERS]
 #*.*.udpReuseAddress := "yes";
 "MSC_Test-MNCC".MNCC.socket_type := "SEQPACKET";
+*.MSCVTY.CTRL_MODE := "client"
+*.MSCVTY.CTRL_HOSTNAME := "127.0.0.1"
+*.MSCVTY.CTRL_PORTNUM := "4254"
+*.MSCVTY.CTRL_LOGIN_SKIPPED := "yes"
+*.MSCVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
+*.MSCVTY.CTRL_READMODE := "buffered"
+*.MSCVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
+*.MSCVTY.PROMPT1 := "OsmoMSC> "
+
 
 [MODULE_PARAMETERS]
 M3UA_Emulation.tsp_logVerbose := true;
 BSSAP_Adapter.mp_own_pc := 193;/* 0.23.3 */
 BSSAP_Adapter.mp_peer_pc := 185;   /* 0.23.1 */
 BSSAP_Adapter.mp_sctp_addr := { 23906, "127.0.0.1", 2905, "127.0.0.1" };
+Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoMSC";
 
 [MAIN_CONTROLLER]
 
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 3c0a460..e0ee84c 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -20,6 +20,9 @@
 import from Osmocom_CTRL_Types all;
 import from Osmocom_CTRL_Adapter all;
 
+import from TELNETasp_PortType all;
+import from Osmocom_VTY_Functions all;
+
 import from MNCC_Emulation all;
 import from MNCC_Types all;
 
@@ -49,6 +52,8 @@
 
/* only to get events from IPA underneath GSUP */
port IPA_CTRL_PT GSUP_IPA_EVENT;
+   /* VTY to MSC */
+   port TELNETasp_PT MSCVTY;
 }
 
 modulepar {
@@ -117,6 +122,10 @@
f_ipa_ctrl_start(mp_msc_ip, mp_msc_ctrl_port);
f_init_mncc("MSC_Test");
f_init_gsup("MSC_Test");
+
+   map(self:MSCVTY, system:MSCVTY);
+   f_vty_set_prompts(MSCVTY);
+   f_vty_transceive(MSCVTY, "enable");
 }
 
 template PDU_BSSAP ts_BSSAP_BSSMAP := {
@@ -343,6 +352,17 @@
T.timeout;
 }
 
+function f_vty_config(TELNETasp_PT pt, charstring config_node, charstring cmd)
+{
+   /* enter config mode; enter node */
+   f_vty_enter_config(pt);
+   f_vty_transceive(pt, config_node);
+   /* execute command */
+   f_vty_transceive(pt, cmd);
+   /* leave config mode */
+   f_vty_transceive(pt, "end");
+}
+
 private function f_tc_lu_imsi_noauth_tmsi(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
g_pars := pars;
f_perform_lu(false, true, true);
@@ -350,6 +370,8 @@
 testcase TC_lu_imsi_noauth_tmsi() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
+   f_vty_config(MSCVTY, "network", "authentication optional");
+   f_vty_config(MSCVTY, "msc", "assign-tmsi");
 
vc_conn := f_start_handler(refers(f_tc_lu_imsi_noauth_tmsi), 
testcasename(), 1);
vc_conn.done;
@@ -362,6 +384,8 @@
 testcase TC_lu_imsi_noauth_notmsi() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
+   f_vty_config(MSCVTY, "network", "authentication optional");
+   f_vty_config(MSCVTY, "msc", "no assign-tmsi");
 
vc_conn := f_start_handler(refers(f_tc_lu_imsi_noauth_notmsi), 
testcasename(), 2);
vc_conn.done;
@@ -391,6 +415,7 @@
 testcase TC_lu_imsi_reject() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
+   f_vty_config(MSCVTY, "network", "authentication optional");
 
vc_conn := f_start_handler(refers(f_tc_lu_imsi_reject), testcasename(), 
3);
vc_conn.done;
@@ -421,6 +446,7 @@
 testcase TC_lu_imsi_timeout_gsup() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
+   f_vty_config(MSCVTY, "network", "authentication optional");
 
vc_conn := f_start_handler(refers(f_tc_lu_imsi_timeout_gsup), 
testcasename(), 4);
vc_conn.done;
@@ -433,6 +459,7 @@
 testcase TC_lu_imsi_auth_tmsi() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
+   f_vty_config(MSCVTY, "network", "authentication required");
 
vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi), 
testcasename(), 5);
vc_conn.done;
@@ -475,6 +502,7 @@
 testcase TC_cmserv_imsi_unknown() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
f_init();
+   f_vty_config(MSCVTY, "network", "authentication optional");
vc_conn := f_start_handler(refers(f_t

osmo-ttcn3-hacks[master]: MSC: Use VTY to enable/disable authentication + TMSI allocation

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6038
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifaa0f119d37b18b804c563c045755cc23d509617
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: Osmocom_VTY_Functions: Make prompt configurable

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Osmocom_VTY_Functions: Make prompt configurable
..


Osmocom_VTY_Functions: Make prompt configurable

We want to use this code also for OsmoMSC testing, so let's make the
prefix configurable as module parameter.

Change-Id: Iec846227e88b3dc0d3be9474b8b926719161c9ee
---
M library/Osmocom_VTY_Functions.ttcn
1 file changed, 42 insertions(+), 33 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/Osmocom_VTY_Functions.ttcn 
b/library/Osmocom_VTY_Functions.ttcn
index 1215e0d..eb51a03 100644
--- a/library/Osmocom_VTY_Functions.ttcn
+++ b/library/Osmocom_VTY_Functions.ttcn
@@ -1,58 +1,67 @@
 module Osmocom_VTY_Functions {
import from TELNETasp_PortType all;
 
-   /* permitted prompts on VTY */
-   const charstring NORMAL_PROMPT := "OpenBSC> ";
-   const charstring ENABLE_PROMPT := "OpenBSC# ";
-   const charstring CONFIG_PROMPT := "OpenBSC(*)\#";
-   template charstring t_vty_unknown := pattern "*% Unknown command.";
+   modulepar {
+   charstring mp_prompt_prefix := "OpenBSC";
+   }
 
-   const ASP_TelnetDynamicConfig vty_prompt[3] := {
-   {
-   prompt := {
-   id := 1,
-   prompt := NORMAL_PROMPT,
-   has_wildcards := false
-   }
-   }, {
-   prompt := {
-   id := 2,
-   prompt := ENABLE_PROMPT,
-   has_wildcards := false
-   }
-   }, {
-   prompt := {
-   id := 3,
-   prompt := CONFIG_PROMPT,
-   has_wildcards := true
-   }
-   }
-   };
+   const charstring VTY_VIEW_SUFFIX := "> ";
+   const charstring VTY_ENABLE_SUFFIX := "# ";
+   const charstring VTY_CFG_SUFFIX := "(*)";
+
+   template charstring t_vty_unknown := pattern "*% Unknown command.";
 
/* configure prompts in TELNETasp module */
function f_vty_set_prompts(TELNETasp_PT pt) {
+   var ASP_TelnetDynamicConfig vty_prompt[3] := {
+   {
+   prompt := {
+   id := 1,
+   prompt := mp_prompt_prefix & 
VTY_VIEW_SUFFIX,
+   has_wildcards := false
+   }
+   }, {
+   prompt := {
+   id := 2,
+   prompt := mp_prompt_prefix & 
VTY_ENABLE_SUFFIX,
+   has_wildcards := false
+   }
+   }, {
+   prompt := {
+   id := 3,
+   prompt := mp_prompt_prefix & 
VTY_CFG_SUFFIX,
+   has_wildcards := true
+   }
+   }
+   };
+
/* set some configuration that isn't possible to express
 * in the config file due to syntactic restrictions (Who 
invents config
 * files that don't permit regular expressions? */
for (var integer i := 0; i < sizeof(vty_prompt); i:= i + 1) {
-   pt.send(vty_prompt[i])
+   log(vty_prompt[i]);
+   pt.send(vty_prompt[i]);
}
}
 
/* wait for any of the permitted prompts; buffer + return all 
intermediate output */
function f_vty_wait_for_prompt(TELNETasp_PT pt) return charstring {
-   template charstring config_pattern := pattern CONFIG_PROMPT;
var charstring rx, buf := "";
timer T := 2.0;
 
T.start;
alt {
-   [] pt.receive(NORMAL_PROMPT) { };
-   [] pt.receive(ENABLE_PROMPT) { };
-   [] pt.receive(config_pattern) { };
-   [] pt.receive(t_vty_unknown) { testcase.stop(fail, 
"VTY: Unknown Command") };
+   [] pt.receive(mp_prompt_prefix & VTY_VIEW_SUFFIX) { };
+   [] pt.receive(mp_prompt_prefix & VTY_ENABLE_SUFFIX) { };
+   [] pt.receive(pattern mp_prompt_prefix & 
VTY_CFG_SUFFIX) { };
+   [] pt.receive(t_vty_unknown) {
+   testcase.stop(fail, "VTY: Unknown Command");
+   };
[] pt.receive(charstring:?)

[MERGED] osmo-ttcn3-hacks[master]: f_enc_IMSI_L3: Fix filler digit in *even* case

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: f_enc_IMSI_L3: Fix filler digit in *even* case
..


f_enc_IMSI_L3: Fix filler digit in *even* case

We actually need to add the filler digit 'F' if the number of digits
is even.  It is absent when the number of digits is odd.

Change-Id: Ic1353f4ea09bba3151636b94a99c8559e0289ffd
---
M library/L3_Templates.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index db514a4..c603b7b 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -47,10 +47,10 @@
var integer len := lengthof(digits);
if (len rem 2 == 1) {   /* modulo remainder */
l3.oddevenIndicator := '1'B;
-   l3.fillerDigit := ''B;
+   l3.fillerDigit := omit;
} else {
l3.oddevenIndicator := '0'B;
-   l3.fillerDigit := omit;
+   l3.fillerDigit := ''B;
}
l3.digits := digits;
return l3;

-- 
To view, visit https://gerrit.osmocom.org/6041
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1353f4ea09bba3151636b94a99c8559e0289ffd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: msc: Cosmetic (fix comment)

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: Cosmetic (fix comment)
..


msc: Cosmetic (fix comment)

Change-Id: I20c65454f606a5c3bc3c5a127ae02b6c204ca06e
---
M msc_tests/MSC_Tests.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 959cd37..3c0a460 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -882,7 +882,7 @@
vc_conn.done;
 }
 
-/* establish an emergency call by IMEI, no SIM inserted (and hence no IMSI) */
+/* establish an emergency call by IMSI, SIM inserted (and hence IMSI) */
 private function f_tc_emerg_call_imsi(charstring id, BSC_ConnHdlrPars pars) 
runs on BSC_ConnHdlr {
g_pars := pars;
/* First perform location update to ensure subscriber is known */

-- 
To view, visit https://gerrit.osmocom.org/6036
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I20c65454f606a5c3bc3c5a127ae02b6c204ca06e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: msc: Add TC_lu_disconnect: Start LU, then do a hard SCCP dis...

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: Add TC_lu_disconnect: Start LU, then do a hard SCCP 
disconnect
..


msc: Add TC_lu_disconnect: Start LU, then do a hard SCCP disconnect

Change-Id: I04d0b09350c6a1c9b8fb9aac87158a142d80f18f
---
M msc_tests/MSC_Tests.ttcn
1 file changed, 30 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 0fad797..9cf6ce5 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -620,6 +620,36 @@
vc_conn.done;
 }
 
+/* Test LU but BSC will send a clear request in the middle */
+private function f_tc_lu_disconnect(charstring id, BSC_ConnHdlrPars pars) runs 
on BSC_ConnHdlr {
+   g_pars := pars;
+
+   var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
+   var PDU_DTAP_MT dtap_mt;
+
+   /* tell GSUP dispatcher to send this IMSI to us */
+   f_create_gsup_expect(hex2str(g_pars.imsi));
+
+   /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
+   f_bssap_compl_l3(l3_lu);
+
+   /* Send Early Classmark, just for the fun of it */
+   BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
+
+   f_sleep(1.0);
+   /* send clear request in the middle of the LU */
+   BSSAP.send(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
+   setverdict(pass);
+}
+testcase TC_lu_disconnect() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+
+   vc_conn := f_start_handler(refers(f_tc_lu_disconnect), testcasename(), 
9);
+   vc_conn.done;
+}
+
+
 /* Test LU but with illegal mobile identity type = IMEI */
 private function f_tc_lu_by_imei(charstring id, BSC_ConnHdlrPars pars) runs on 
BSC_ConnHdlr {
g_pars := pars;

-- 
To view, visit https://gerrit.osmocom.org/6030
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I04d0b09350c6a1c9b8fb9aac87158a142d80f18f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: msc: Fix generation of IMSI/IMEI/MSISDN

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: Fix generation of IMSI/IMEI/MSISDN
..


msc: Fix generation of IMSI/IMEI/MSISDN

Now each test case uses unique IMSI/IMEI/MSISDN numbers, which helps
to identify test cases from traces or from VTY introspection

Change-Id: I54d05e8ec7aeecc48666d3b369351212a6a0ea6f
---
M msc_tests/MSC_Tests.ttcn
1 file changed, 33 insertions(+), 30 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index e0ee84c..5976b45 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -299,21 +299,24 @@
 
 type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on 
BSC_ConnHdlr;
 
-function f_gen_imei(hexstring prefix, integer suffix) return hexstring {
-   var integer suffix_len := 15 - lengthof(prefix);
-   suffix_len := suffix_len;
-   return prefix & int2hex(suffix, suffix_len);
+private function f_concat_pad(integer tot_len, hexstring prefix, integer 
suffix) return hexstring {
+   var integer suffix_len := tot_len - lengthof(prefix);
+   var charstring suffix_ch := int2str(suffix);
+   var integer pad_len := suffix_len - lengthof(suffix_ch);
+
+   return prefix & int2hex(0, pad_len) & str2hex(suffix_ch);
 }
 
-function f_gen_imsi(hexstring prefix, integer suffix) return hexstring {
-   var integer suffix_len := 15 - lengthof(prefix);
-   suffix_len := suffix_len-1; /* FIXME: fix odd IMSI length */
-   return prefix & int2hex(suffix, suffix_len);
+function f_gen_imei(integer suffix) return hexstring {
+   return f_concat_pad(15, '4'H, suffix);
 }
 
-function f_gen_msisdn(hexstring prefix, integer suffix) return hexstring {
-   var integer suffix_len := 12 - lengthof(prefix);
-   return prefix & int2hex(suffix, suffix_len);
+function f_gen_imsi(integer suffix) return hexstring {
+   return f_concat_pad(15, '26242'H, suffix);
+}
+
+function f_gen_msisdn(integer suffix) return hexstring {
+   return f_concat_pad(12, '49123'H, suffix);
 }
 
 /* FIXME: move into BSC_ConnectionHandler? */
@@ -323,9 +326,9 @@
sccp_addr_own := g_sccp_addr_own,
sccp_addr_peer := g_sccp_addr_peer,
cell_id := valueof(ts_CellId_CGI('262'H, '042'H, 23, 42)),
-   imei := f_gen_imei('4'H, imsi_suffix),
-   imsi := f_gen_imsi('26242'H, imsi_suffix),
-   msisdn := f_gen_msisdn('49123'H, imsi_suffix),
+   imei := f_gen_imei(imsi_suffix),
+   imsi := f_gen_imsi(imsi_suffix),
+   msisdn := f_gen_msisdn(imsi_suffix),
tmsi := omit,
cm2 := valueof(ts_CM2_default),
cm3 := omit
@@ -503,7 +506,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
f_vty_config(MSCVTY, "network", "authentication optional");
-   vc_conn := f_start_handler(refers(f_tc_cmserv_imsi_unknown), 
testcasename(), 5);
+   vc_conn := f_start_handler(refers(f_tc_cmserv_imsi_unknown), 
testcasename(), 6);
vc_conn.done;
 }
 
@@ -555,7 +558,7 @@
f_init();
f_vty_config(MSCVTY, "network", "authentication optional");
 
-   vc_conn := f_start_handler(refers(f_tc_lu_and_mo_call), testcasename(), 
6);
+   vc_conn := f_start_handler(refers(f_tc_lu_and_mo_call), testcasename(), 
7);
vc_conn.done;
 }
 
@@ -589,7 +592,7 @@
f_init();
f_vty_config(MSCVTY, "network", "authentication required");
 
-   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_timeout), 
testcasename(), 7);
+   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_timeout), 
testcasename(), 8);
vc_conn.done;
 }
 
@@ -623,7 +626,7 @@
f_init();
f_vty_config(MSCVTY, "network", "authentication required");
 
-   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_err), 
testcasename(), 8);
+   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_err), 
testcasename(), 9);
vc_conn.done;
 }
 
@@ -655,7 +658,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_clear_request), 
testcasename(), 8);
+   vc_conn := f_start_handler(refers(f_tc_lu_clear_request), 
testcasename(), 10);
vc_conn.done;
 }
 
@@ -684,7 +687,7 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_disconnect), testcasename(), 
9);
+   vc_conn := f_start_handler(refers(f_tc_lu_disconnect), testcasename(), 
11);
vc_conn.done;
 }
 
@@ -720,7 +723,7 @@
f_init();
f_vty_config(MSCVTY, "network", "authentication optional");
 
-   vc_conn := f_start_handler(refers(f_tc_lu_by_imei), testcasename(), 9);
+   vc_conn := f_start_handler(refers(f_tc_lu_by_imei), testcasename(), 12);
vc_conn.done;
 }
 

[MERGED] osmo-ttcn3-hacks[master]: MSC_Tests: Proper treatment of IMEI + TMSI

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: MSC_Tests: Proper treatment of IMEI + TMSI
..


MSC_Tests: Proper treatment of IMEI + TMSI

* don't use IMSI as IMEI
* store the TMSI (after it is allocated) in the g_pars variable for later use

Change-Id: I717f1c9ab21e5be8b88f10ce4e8c583b385f3664
---
M msc_tests/BSC_ConnectionHandler.ttcn
M msc_tests/MSC_Tests.ttcn
2 files changed, 14 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc_tests/BSC_ConnectionHandler.ttcn 
b/msc_tests/BSC_ConnectionHandler.ttcn
index 69854e3..25f8daf 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -28,8 +28,10 @@
SCCP_PAR_Address sccp_addr_own,
SCCP_PAR_Address sccp_addr_peer,
BSSMAP_IE_CellIdentifier cell_id,
+   hexstring imei,
hexstring imsi,
hexstring msisdn,
+   OCT4 tmsi optional,
BSSMAP_IE_ClassmarkInformationType2 cm2,
BSSMAP_IE_ClassmarkInformationType3 cm3 optional
 };
@@ -199,6 +201,7 @@
setverdict(fail, "Expected TMSI but no TMSI was 
allocated");
self.stop;
} else {
+   g_pars.tmsi := 
lu_acc.mobileIdentityTLV.mobileIdentityLV.mobileIdentityV.oddEvenInd_identity.tmsi_ptmsi.octets;

BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_TmsiRealloc_Cmpl));
}
} else {
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 4bacc1d..959cd37 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -290,6 +290,12 @@
 
 type function void_fn(charstring id, BSC_ConnHdlrPars pars) runs on 
BSC_ConnHdlr;
 
+function f_gen_imei(hexstring prefix, integer suffix) return hexstring {
+   var integer suffix_len := 15 - lengthof(prefix);
+   suffix_len := suffix_len;
+   return prefix & int2hex(suffix, suffix_len);
+}
+
 function f_gen_imsi(hexstring prefix, integer suffix) return hexstring {
var integer suffix_len := 15 - lengthof(prefix);
suffix_len := suffix_len-1; /* FIXME: fix odd IMSI length */
@@ -308,8 +314,10 @@
sccp_addr_own := g_sccp_addr_own,
sccp_addr_peer := g_sccp_addr_peer,
cell_id := valueof(ts_CellId_CGI('262'H, '042'H, 23, 42)),
+   imei := f_gen_imei('4'H, imsi_suffix),
imsi := f_gen_imsi('26242'H, imsi_suffix),
msisdn := f_gen_msisdn('49123'H, imsi_suffix),
+   tmsi := omit,
cm2 := valueof(ts_CM2_default),
cm3 := omit
};
@@ -654,7 +662,7 @@
 private function f_tc_lu_by_imei(charstring id, BSC_ConnHdlrPars pars) runs on 
BSC_ConnHdlr {
g_pars := pars;
 
-   var PDU_ML3_MS_NW l3_lu := f_build_lu_imei(g_pars.imsi)
+   var PDU_ML3_MS_NW l3_lu := f_build_lu_imei(g_pars.imei)
var PDU_DTAP_MT dtap_mt;
 
/* tell GSUP dispatcher to send this IMSI to us */
@@ -788,7 +796,7 @@
 private function f_tc_imsi_detach_by_imei(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
g_pars := pars;
 
-   var MobileIdentityLV mi := valueof(ts_MI_IMEI_LV(g_pars.imsi));
+   var MobileIdentityLV mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
 
/* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
f_bssap_compl_l3(valueof(ts_ML3_MO_MM_IMSI_DET_Ind(mi)));
@@ -860,7 +868,7 @@
 private function f_tc_emerg_call_imei_reject(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
g_pars := pars;
 
-   var MobileIdentityLV mi := valueof(ts_MI_IMEI_LV(g_pars.imsi));
+   var MobileIdentityLV mi := valueof(ts_MI_IMEI_LV(g_pars.imei));
var PDU_ML3_MS_NW l3_info := valueof(ts_CM_SERV_REQ('0010'B, mi));
f_bssap_compl_l3(l3_info);
BSSAP.receive(tr_PDU_DTAP_MT(tr_CM_SERV_REJ('05'O)));

-- 
To view, visit https://gerrit.osmocom.org/6035
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I717f1c9ab21e5be8b88f10ce4e8c583b385f3664
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: f_enc_IMSI_L3: Fix filler digit in *even* case

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6041
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1353f4ea09bba3151636b94a99c8559e0289ffd
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: msc: Add all test cases to control section

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6031
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I79abcbe5638a02c1d6d94ba31ce72bfbc372fd21
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: msc: Add all test cases to control section

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: Add all test cases to control section
..


msc: Add all test cases to control section

Change-Id: I79abcbe5638a02c1d6d94ba31ce72bfbc372fd21
---
M msc_tests/MSC_Tests.ttcn
1 file changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 9cf6ce5..4bacc1d 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -978,6 +978,18 @@
execute( TC_lu_and_mo_call() );
execute( TC_lu_auth_sai_timeout() );
execute( TC_lu_auth_sai_err() );
+   execute( TC_lu_clear_request() );
+   execute( TC_lu_disconnect() );
+   execute( TC_lu_by_imei() );
+   execute( TC_lu_by_tmsi_noauth_unknown() );
+   execute( TC_imsi_detach_by_imsi() );
+   execute( TC_imsi_detach_by_tmsi() );
+   execute( TC_imsi_detach_by_imei() );
+   execute( TC_emerg_call_imei_reject() );
+   execute( TC_emerg_call_imsi() );
+   execute( TC_cm_serv_req_vgcs_reject() );
+   execute( TC_cm_serv_req_vbs_reject() );
+   execute( TC_cm_serv_req_lcs_reject() );
 }
 
 

-- 
To view, visit https://gerrit.osmocom.org/6031
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I79abcbe5638a02c1d6d94ba31ce72bfbc372fd21
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: MSC_Tests: More CM SERVICE REQ and EMERGENCY CALL related tests

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: MSC_Tests: More CM SERVICE REQ and EMERGENCY CALL related tests
..


MSC_Tests: More CM SERVICE REQ and EMERGENCY CALL related tests

Change-Id: I04ca21824f66ad90d9dac2c25000ecd724aa4528
---
M library/L3_Templates.ttcn
M msc_tests/BSC_ConnectionHandler.ttcn
M msc_tests/MSC_Tests.ttcn
3 files changed, 272 insertions(+), 8 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index ca81b72..db514a4 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -361,6 +361,29 @@

ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMEI_LV(imei)));
 
 
+template (value) MobileStationClassmark1_V ts_CM1(BIT1 a5_1_unavail := '0'B, 
BIT2 rev := '10'B) := {
+   rf_PowerCapability := '010'B,
+   a5_1 := a5_1_unavail,
+   esind := '1'B,
+   revisionLevel := rev,
+   spare1_1 := '0'B
+}
+
+template PDU_ML3_MS_NW ts_ML3_MO_MM_IMSI_DET_Ind(MobileIdentityLV mi,
+template 
MobileStationClassmark1_V cm1 := ts_CM1)
+modifies ts_ML3_MO := {
+   msgs := {
+   mm := {
+   imsiDetachIndication := {
+   messageType := '01'B,
+   nsd := '00'B,
+   mobileStationClassmark1 := cm1,
+   mobileIdentityLV := mi
+   }
+   }
+   }
+}
+
 template PDU_ML3_MS_NW ts_ML3_MO_CC(integer tid) := {
discriminator := '0011'B,
tiOrSkip := {
@@ -440,6 +463,30 @@
}
 }
 
+template PDU_ML3_MS_NW ts_ML3_MO_CC_EMERG_SETUP(integer tid, template 
BearerCapability_TLV bcap := ts_Bcap_voice) := {
+   discriminator := '0011'B,
+   tiOrSkip := {
+   transactionId := {
+   tio := int2bit(tid, 3),
+   tiFlag := '0'B,
+   tIExtension := omit
+   }
+   },
+   msgs := {
+   cc := {
+   emergencySetup := {
+   messageType := '001110'B,
+   nsd := '00'B,
+   bearerCapability := bcap,
+   streamIdentifier := omit,
+   supportedCodecs := omit,
+   emergencyCategory := omit
+   }
+   }
+   }
+}
+
+
 template PDU_ML3_NW_MS tr_ML3_MT_CC_CALL_PROC(integer tid) := {
discriminator := '0011'B,
tiOrSkip := {
diff --git a/msc_tests/BSC_ConnectionHandler.ttcn 
b/msc_tests/BSC_ConnectionHandler.ttcn
index 0fb1702..69854e3 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -80,14 +80,6 @@
bssap := bssap
 };
 
-template (value) MobileStationClassmark1_V ts_CM1(BIT1 a5_1_unavail := '0'B, 
BIT2 rev := '10'B) := {
-   rf_PowerCapability := '010'B,
-   a5_1 := a5_1_unavail,
-   esind := '1'B,
-   revisionLevel := rev,
-   spare1_1 := '0'B
-}
-
 /* Encode 'l3' and ask BSSMAP_Emulation to create new connection with COMPL L3 
INFO */
 function f_bssap_compl_l3(PDU_ML3_MS_NW l3)
 runs on BSC_ConnHdlr {
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index c2d1771..0fad797 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -702,6 +702,228 @@
 }
 
 
+/* Test IMSI DETACH (MI=IMSI) */
+private function f_tc_imsi_detach_by_imsi(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
+   g_pars := pars;
+
+   var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(g_pars.imsi));
+
+   /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
+   f_bssap_compl_l3(valueof(ts_ML3_MO_MM_IMSI_DET_Ind(mi)));
+
+   /* Send Early Classmark, just for the fun of it? */
+   BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
+
+   /* wait for normal teardown */
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+   setverdict(pass);
+}
+testcase TC_imsi_detach_by_imsi() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+
+   vc_conn := f_start_handler(refers(f_tc_imsi_detach_by_imsi), 
testcasename(), 2);
+   vc_conn.done;
+}
+
+/* Test IMSI DETACH (MI=TMSI) */
+private function f_tc_imsi_detach_by_tmsi(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
+   g_pars := pars;
+
+   var MobileIdentityLV mi := valueof(ts_MI_TMSI_LV('01020304'O));
+
+   /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
+   f_bssap_compl_l3(valueof(ts_ML3_MO_MM_IMSI_DET_Ind(mi)));
+
+   /* Send Early Classmark, just for the f

[MERGED] osmo-ttcn3-hacks[master]: msc: Add test case for LU with MI=IMEI (which is illegal)

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: Add test case for LU with MI=IMEI (which is illegal)
..


msc: Add test case for LU with MI=IMEI (which is illegal)

Change-Id: Ie3c91a0ff212a70a8e03e0579f240a10bc4356f4
---
M library/L3_Templates.ttcn
M msc_tests/BSC_ConnectionHandler.ttcn
M msc_tests/MSC_Tests.ttcn
3 files changed, 163 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index d652873..ca81b72 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -56,6 +56,18 @@
return l3;
 }
 
+private function f_enc_IMEI_L3(hexstring digits) return IMEI_L3 {
+   var IMEI_L3 l3;
+   var integer len := lengthof(digits);
+   if (len rem 2 == 1) {   /* modulo remainder */
+   l3.oddevenIndicator := '1'B;
+   } else {
+   l3.oddevenIndicator := '0'B;
+   }
+   l3.digits := digits;
+   return l3;
+}
+
 /* send template fro Mobile Identity (IMSI) */
 template (value) MobileIdentityLV ts_MI_IMSI_LV(hexstring imsi_digits) := {
lengthIndicator := 0, /* overwritten */
@@ -66,6 +78,18 @@
}
}
 }
+
+/* send template fro Mobile Identity (IMEI) */
+template (value) MobileIdentityLV ts_MI_IMEI_LV(hexstring imei_digits) := {
+   lengthIndicator := 0, /* overwritten */
+   mobileIdentityV := {
+   typeOfIdentity := '000'B, /* overwritten */
+   oddEvenInd_identity := {
+   imei := f_enc_IMEI_L3(imei_digits)
+   }
+   }
+}
+
 
 /* Send template for Classmark 2 */
 template (value) MobileStationClassmark2_LV ts_CM2 := {
@@ -300,6 +324,43 @@
}
 }
 
+template PDU_ML3_NW_MS tr_ML3_MT_MM_ID_Req(template BIT3 id_type := ?) := {
+   discriminator := '0101'B,
+   tiOrSkip := {
+   skipIndicator := ''B
+   },
+   msgs := {
+   mm := {
+   identityRequest := {
+   messageType := '011000'B,
+   nsd := '00'B,
+   identityType := id_type,
+   spare1_5 := ?
+   }
+   }
+   }
+}
+
+template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp(MobileIdentityLV mi) modifies 
ts_ML3_MO := {
+   msgs := {
+   mm := {
+   identityResponse := {
+   messageType := '011001'B,
+   nsd := '00'B,
+   mobileIdentityLV := mi,
+   p_TMSI_TypeTV := omit,
+   routingAreaIdentification2TLV := omit,
+   p_TMSISignature2TLV := omit
+   }
+   }
+   }
+}
+template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMSI(hexstring imsi) :=
+   
ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMSI_LV(imsi)));
+template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMEI(hexstring imei) :=
+   
ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMEI_LV(imei)));
+
+
 template PDU_ML3_MS_NW ts_ML3_MO_CC(integer tid) := {
discriminator := '0011'B,
tiOrSkip := {
diff --git a/msc_tests/BSC_ConnectionHandler.ttcn 
b/msc_tests/BSC_ConnectionHandler.ttcn
index f9b4d3e..0fb1702 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -125,6 +125,16 @@
var MobileIdentityLV mi := valueof(ts_MI_IMSI_LV(imsi));
return f_build_lu(mi);
 }
+function f_build_lu_imei(hexstring imei) return PDU_ML3_MS_NW
+{
+   var MobileIdentityLV mi := valueof(ts_MI_IMEI_LV(imei));
+   return f_build_lu(mi);
+}
+function f_build_lu_tmsi(OCT4 tmsi) return PDU_ML3_MS_NW
+{
+   var MobileIdentityLV mi := valueof(ts_MI_TMSI_LV(tmsi));
+   return f_build_lu(mi);
+}
 private function f_build_lu(MobileIdentityLV mi) return PDU_ML3_MS_NW
 {
var LocationAreaIdentification_V old_lai := { '62F220'O, ''O };
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index a21ad50..c2d1771 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -620,6 +620,98 @@
vc_conn.done;
 }
 
+/* Test LU but with illegal mobile identity type = IMEI */
+private function f_tc_lu_by_imei(charstring id, BSC_ConnHdlrPars pars) runs on 
BSC_ConnHdlr {
+   g_pars := pars;
+
+   var PDU_ML3_MS_NW l3_lu := f_build_lu_imei(g_pars.imsi)
+   var PDU_DTAP_MT dtap_mt;
+
+   /* tell GSUP dispatcher to send this IMSI to us */
+   f_create_gsup_expect(hex2str(g_pars.imsi));
+
+   /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
+   f_bssap_compl_l3(l3_lu);
+
+   /* Send Early Classmark, just for the fun of it */
+   BSSAP.send(ts

[MERGED] osmo-ttcn3-hacks[master]: msc: Test closing BSSAP connection of LU by ClearCommand

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: Test closing BSSAP connection of LU by ClearCommand
..


msc: Test closing BSSAP connection of LU by ClearCommand

Change-Id: I9194da2f9324ee17c920458cb920a6fa718ac739
---
M library/BSSMAP_Templates.ttcn
M msc_tests/MSC_Tests.ttcn
2 files changed, 44 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index 925a8e6..5331505 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -609,6 +609,18 @@
}
 }
 
+template (value) PDU_BSSAP ts_BSSMAP_ClearRequest(BssmapCause cause)
+modifies ts_BSSAP_BSSMAP := {
+   pdu := {
+   bssmap := {
+   clearRequest := {
+   messageType := '22'O,   /* overwritten */
+   cause := ts_BSSMAP_IE_Cause(cause)
+   }
+   }
+   }
+}
+
 template PDU_BSSAP tr_BSSMAP_ClearRequest modifies tr_BSSAP_BSSMAP := {
pdu := {
bssmap := {
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 9f8dd69..a21ad50 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -588,6 +588,38 @@
vc_conn.done;
 }
 
+/* Test LU but BSC will send a clear request in the middle */
+private function f_tc_lu_clear_request(charstring id, BSC_ConnHdlrPars pars) 
runs on BSC_ConnHdlr {
+   g_pars := pars;
+
+   var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
+   var PDU_DTAP_MT dtap_mt;
+
+   /* tell GSUP dispatcher to send this IMSI to us */
+   f_create_gsup_expect(hex2str(g_pars.imsi));
+
+   /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
+   f_bssap_compl_l3(l3_lu);
+
+   /* Send Early Classmark, just for the fun of it */
+   BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
+
+   f_sleep(1.0);
+   /* send clear request in the middle of the LU */
+   BSSAP.send(ts_BSSMAP_ClearRequest(0));
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+   setverdict(pass);
+}
+testcase TC_lu_clear_request() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+
+   vc_conn := f_start_handler(refers(f_tc_lu_clear_request), 
testcasename(), 8);
+   vc_conn.done;
+}
+
 
 
 control {

-- 
To view, visit https://gerrit.osmocom.org/6027
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9194da2f9324ee17c920458cb920a6fa718ac739
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: msc: Add tests for HLR SAI timeout and HLR SAI error

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc: Add tests for HLR SAI timeout and HLR SAI error
..


msc: Add tests for HLR SAI timeout and HLR SAI error

Change-Id: I7f8c8ff9ccadd7b7b14cba12a34cebe6855a5367
---
M library/GSUP_Types.ttcn
M msc_tests/MSC_Tests.ttcn
2 files changed, 75 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index bc54510..15560c7 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -192,9 +192,14 @@
valueof(ts_GSUP_IE_IMSI(imsi)), auth_tuple });
 
 template GSUP_PDU tr_GSUP_SAI_ERR(template hexstring imsi, template integer 
cause) :=
-   tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, {
+   tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR, {
tr_GSUP_IE_IMSI(imsi), tr_GSUP_IE_Cause(cause) });
 
+template GSUP_PDU ts_GSUP_SAI_ERR(hexstring imsi, integer cause) :=
+   tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_ERROR, {
+   ts_GSUP_IE_IMSI(imsi), ts_GSUP_IE_Cause(cause) });
+
+
 template GSUP_PDU tr_GSUP_SAI_RES(template hexstring imsi) :=
tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, {
tr_GSUP_IE_IMSI(imsi), *, 
tr_GSUP_IE(OSMO_GSUP_AUTH_TUPLE_IE), * });
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 15ffc20..9f8dd69 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -518,7 +518,73 @@
var BSC_ConnHdlr vc_conn;
f_init();
 
-   vc_conn := f_start_handler(refers(f_tc_lu_and_mo_call), testcasename(), 
1);
+   vc_conn := f_start_handler(refers(f_tc_lu_and_mo_call), testcasename(), 
6);
+   vc_conn.done;
+}
+
+/* Test LU (with authentication enabled), where HLR times out sending SAI 
response */
+private function f_tc_lu_auth_sai_timeout(charstring id, BSC_ConnHdlrPars 
pars) runs on BSC_ConnHdlr {
+   g_pars := pars;
+
+   var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
+   var PDU_DTAP_MT dtap_mt;
+
+   /* tell GSUP dispatcher to send this IMSI to us */
+   f_create_gsup_expect(hex2str(g_pars.imsi));
+
+   /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
+   f_bssap_compl_l3(l3_lu);
+
+   /* Send Early Classmark, just for the fun of it */
+   BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
+
+   GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi));
+   /* The HLR would normally return an auth vector here, but we fail to do 
so. */
+
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej));
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+   setverdict(pass);
+}
+testcase TC_lu_auth_sai_timeout() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+
+   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_timeout), 
testcasename(), 7);
+   vc_conn.done;
+}
+
+/* Test LU (with authentication enabled), where HLR rejects sending SAI error 
*/
+private function f_tc_lu_auth_sai_err(charstring id, BSC_ConnHdlrPars pars) 
runs on BSC_ConnHdlr {
+   g_pars := pars;
+
+   var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
+   var PDU_DTAP_MT dtap_mt;
+
+   /* tell GSUP dispatcher to send this IMSI to us */
+   f_create_gsup_expect(hex2str(g_pars.imsi));
+
+   /* Send BSSAP_Conn_Req with COMPL L3 INFO to MSC */
+   f_bssap_compl_l3(l3_lu);
+
+   /* Send Early Classmark, just for the fun of it */
+   BSSAP.send(ts_BSSMAP_ClassmarkUpd(g_pars.cm2, g_pars.cm3));
+
+   GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi));
+   GSUP.send(ts_GSUP_SAI_ERR(g_pars.imsi, 13));
+
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_LU_Rej));
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND);
+   setverdict(pass);
+}
+testcase TC_lu_auth_sai_err() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+
+   vc_conn := f_start_handler(refers(f_tc_lu_auth_sai_err), 
testcasename(), 8);
vc_conn.done;
 }
 
@@ -531,6 +597,8 @@
execute( TC_lu_imsi_reject() );
execute( TC_lu_imsi_timeout_gsup() );
execute( TC_lu_and_mo_call() );
+   execute( TC_lu_auth_sai_timeout() );
+   execute( TC_lu_auth_sai_err() );
 }
 
 

-- 
To view, visit https://gerrit.osmocom.org/6026
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f8c8ff9ccadd7b7b14cba12a34cebe6855a5367
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: GSUP/L3: Add templates related to authentication

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: GSUP/L3: Add templates related to authentication
..


GSUP/L3: Add templates related to authentication

Change-Id: Id9566e3e075a8837e2e77a7c2b9d8f0f6e9b7554
---
M library/GSUP_Types.ttcn
M library/L3_Templates.ttcn
2 files changed, 152 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn
index 7455085..bc54510 100644
--- a/library/GSUP_Types.ttcn
+++ b/library/GSUP_Types.ttcn
@@ -88,8 +88,15 @@
 variant (val) "CROSSTAG(imsi, tag = OSMO_GSUP_IMSI_IE;
 cause, tag = OSMO_GSUP_CAUSE_IE;
 cancel_type, tag = OSMO_GSUP_CANCEL_TYPE_IE;
+auth_tuple, tag = OSMO_GSUP_AUTH_TUPLE_IE;
 auts, tag = OSMO_GSUP_AUTS_IE;
 rand, tag = OSMO_GSUP_RAND_IE;
+sres, tag = OSMO_GSUP_SRES_IE;
+kc, tag = OSMO_GSUP_KC_IE;
+ik, tag = OSMO_GSUP_IK_IE;
+ck, tag = OSMO_GSUP_CK_IE;
+autn, tag = OSMO_GSUP_AUTN_IE;
+res, tag = OSMO_GSUP_RES_IE;
 msisdn, tag = OSMO_GSUP_MSISDN_IE;
 hlr_number, tag = OSMO_GSUP_HLR_NUMBER_IE;
 cn_domain, tag = OSMO_GSUP_CN_DOMAIN_IE;
@@ -108,6 +115,12 @@
GSUP_IEsauth_tuple,
octetstring auts,
octetstring rand,
+   octetstring sres,
+   octetstring kc,
+   octetstring ik,
+   octetstring ck,
+   octetstring autn,
+   octetstring res,
hexstring   msisdn,
octetstring hlr_number,
GSUP_CnDomain   cn_domain,
@@ -126,6 +139,38 @@
with { extension "prototype(convert) decode(RAW)" };
 
 
+template GSUP_IE ts_GSUP_IE_AuthTuple2G(octetstring rand, octetstring sres,
+   octetstring kc) := {
+   tag := OSMO_GSUP_AUTH_TUPLE_IE,
+   len := 0, /* overwritten */
+   val := {
+   auth_tuple := {
+   valueof(ts_GSUP_IE_RAND(rand)),
+   valueof(ts_GSUP_IE_SRES(sres)),
+   valueof(ts_GSUP_IE_Kc(kc))
+   }
+   }
+}
+
+template GSUP_IE ts_GSUP_IE_AuthTuple2G3G(octetstring rand, octetstring sres,
+ octetstring kc, octetstring ik,
+ octetstring ck, octetstring autn,
+ octetstring res) := {
+   tag := OSMO_GSUP_AUTH_TUPLE_IE,
+   len := 0, /* overwritten */
+   val := {
+   auth_tuple := {
+   valueof(ts_GSUP_IE_RAND(rand)),
+   valueof(ts_GSUP_IE_SRES(sres)),
+   valueof(ts_GSUP_IE_Kc(kc)),
+   valueof(ts_GSUP_IE_IK(ik)),
+   valueof(ts_GSUP_IE_CK(ck)),
+   valueof(ts_GSUP_IE_AUTN(autn)),
+   valueof(ts_GSUP_IE_RES(res))
+   }
+   }
+}
+
 template GSUP_PDU tr_GSUP(template GSUP_MessageType msgt := ?, template 
GSUP_IEs ies := *) := {
msg_type := msgt,
ies := ies
@@ -141,6 +186,10 @@
 
 template GSUP_PDU tr_GSUP_SAI_REQ(template hexstring imsi) :=
tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, { tr_GSUP_IE_IMSI(imsi), 
* });
+
+template (value) GSUP_PDU ts_GSUP_SAI_RES(hexstring imsi, GSUP_IE auth_tuple) 
:=
+   ts_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_RESULT, {
+   valueof(ts_GSUP_IE_IMSI(imsi)), auth_tuple });
 
 template GSUP_PDU tr_GSUP_SAI_ERR(template hexstring imsi, template integer 
cause) :=
tr_GSUP(OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST, {
@@ -241,6 +290,53 @@
}
 }
 
+template (value) GSUP_IE ts_GSUP_IE_SRES(octetstring sres) := {
+   tag := OSMO_GSUP_SRES_IE,
+   len := 0, /* overwritten */
+   val := {
+   sres := sres
+   }
+}
+
+template (value) GSUP_IE ts_GSUP_IE_Kc(octetstring kc) := {
+   tag := OSMO_GSUP_KC_IE,
+   len := 0, /* overwritten */
+   val := {
+   kc := kc
+   }
+}
+
+template (value) GSUP_IE ts_GSUP_IE_IK(octetstring ik) := {
+   tag := OSMO_GSUP_IK_IE,
+   len := 0, /* overwritten */
+   val := {
+   ik := ik
+   }
+}
+
+template (value) GSUP_IE ts_GSUP_IE_CK(octetstring ck) := {
+   tag := OSMO_GSUP_CK_IE,
+   len := 0, /* overwritten */
+   val := {
+   ck := ck
+   }
+}
+
+template (value) GSUP_IE ts_GSUP_IE_AUTN(octetstring autn) := {
+   tag := OSMO_GSUP_AUTN_IE,
+   le

[MERGED] osmo-ttcn3-hacks[master]: WIP: MSC: Add MO call testing

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: WIP: MSC: Add MO call testing
..


WIP: MSC: Add MO call testing

Change-Id: If32cb359b3cf732c4752856538552595dbbf2a8a
---
M library/L3_Templates.ttcn
M library/MNCC_Types.ttcn
M msc_tests/MSC_Tests.ttcn
3 files changed, 110 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index 0da4706..be9386a 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -427,6 +427,52 @@
}
 }
 
+template PDU_ML3_NW_MS tr_ML3_MT_CC_DISC(integer tid) := {
+   discriminator := '0011'B,
+   tiOrSkip := {
+   transactionId := {
+   tio := int2bit(tid, 3),
+   tiFlag := ?,
+   tIExtension := omit
+   }
+   },
+   msgs := {
+   cc := {
+   disconnect_NW_MS := {
+   messageType := '100101'B,
+   nsd := '00'B,
+   cause := ?,
+   facility := *,
+   progressIndicator := *,
+   user_user := *,
+   allowedActions := *
+   }
+   }
+   }
+}
+
+template PDU_ML3_NW_MS tr_ML3_MT_CC_RELEASE(integer tid) := {
+   discriminator := '0011'B,
+   tiOrSkip := {
+   transactionId := {
+   tio := int2bit(tid, 3),
+   tiFlag := ?,
+   tIExtension := omit
+   }
+   },
+   msgs := {
+   cc := {
+   release_NW_MS := {
+   messageType := '101101'B,
+   nsd := '00'B,
+   cause := ?,
+   secondCause := *,
+   facility := *,
+   user_user := *
+   }
+   }
+   }
+}
 
 
 
diff --git a/library/MNCC_Types.ttcn b/library/MNCC_Types.ttcn
index e5d6af9..46159b7 100644
--- a/library/MNCC_Types.ttcn
+++ b/library/MNCC_Types.ttcn
@@ -274,6 +274,18 @@
variant (coding) "FIELDLENGTH(32)";
 }
 
+template MNCC_cause ts_MNCC_cause(int val,
+ GSM48_cause_loc loc := 
GSM48_CAUSE_LOC_PUN_S_LU,
+ GSM48_cause_coding coding := 
GSM48_CAUSE_CS_GSM,
+ octetstring diag := ''O) := {
+   location := loc,
+   coding := coding,
+   rec := 0,
+   rec_val := 0,
+   val := val,
+   diag := diag
+}
+
 type record MNCC_useruser {
int proto,
charstring  info
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index 68e0bef..dea27a7 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -21,6 +21,7 @@
 import from Osmocom_CTRL_Adapter all;
 
 import from MNCC_Emulation all;
+import from MNCC_Types all;
 
 import from GSUP_Emulation all;
 import from GSUP_Types all;
@@ -458,6 +459,56 @@
vc_conn.done;
 }
 
+private function f_tc_lu_and_mo_call(charstring id, BSC_ConnHdlrPars pars) 
runs on BSC_ConnHdlr {
+   g_pars := pars;
+   f_perform_lu(false, true, true);
+
+   f_establish_fully(valueof(ts_MI_IMSI_LV(g_pars.imsi)), false);
+
+   var hexstring called := '12345'H;
+   var integer tid := 0;
+   var MNCC_PDU mncc;
+   f_create_mncc_expect(hex2str(called));
+
+   BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(tid, called)));
+   MNCC.receive(tr_MNCC_SETUP_ind(?, tr_MNCC_number(hex2str(called -> 
value mncc;
+   /* FIXME: extract call_id */
+
+   /* Call Proceeding */
+   MNCC.send(ts_MNCC_CALL_PROC_req(mncc.u.signal.callref, 
ts_MNCC_bcap_voice));
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_CALL_PROC(tid)));
+
+   /* Alerting */
+   MNCC.send(ts_MNCC_ALERT_req(mncc.u.signal.callref));
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_ALERTING(tid)));
+
+   /* Answer. This causes TCH assignment in case of "late assignment" */
+   MNCC.send(ts_MNCC_SETUP_COMPL_req(mncc.u.signal.callref));
+
+   f_sleep(3.0);
+
+   /* Hangup by "B" side */
+   MNCC.send(ts_MNCC_DISC_req(mncc.u.signal.callref, 
valueof(ts_MNCC_cause(23;
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_DISC(tid)));
+
+   /* Release of call */
+   MNCC.send(ts_MNCC_REL_req(mncc.u.signal.callref, 
valueof(ts_MNCC_cause(42;
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(tid)));
+
+   /* clearing of radio channel */
+   BSSAP.receive(tr_BSSMAP_ClearCommand);
+   BSSAP.send(ts_BSSMAP_ClearComplete);
+   BSSAP.receive(BSSAP_Conn_Prim:MSC

[MERGED] osmo-ttcn3-hacks[master]: MSC: Add test for LU with 2G authentication

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: MSC: Add test for LU with 2G authentication
..


MSC: Add test for LU with 2G authentication

Change-Id: I5ea201bd603e581f199cd29056e7e7ebc9bd0923
---
M msc_tests/BSC_ConnectionHandler.ttcn
M msc_tests/MSC_Tests.ttcn
2 files changed, 20 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc_tests/BSC_ConnectionHandler.ttcn 
b/msc_tests/BSC_ConnectionHandler.ttcn
index 39acfb7..ee0e0ae 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -149,9 +149,15 @@
}
 
if (expect_auth) {
+   var OCT16 rand := ''O;
+   var OCT4 sres := ''O;
+   var GSUP_IE auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G(rand, 
sres,
+
''O));
GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi));
-   /* FIXME */
-   //GSUP.send(tr_GSUP_SAI_RES());
+   GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple));
+
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_AUTH_REQ(rand)));
+   BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MT_MM_AUTH_RESP_2G(sres)));
}
 
/* Expect MSC to perform LU with HLR */
diff --git a/msc_tests/MSC_Tests.ttcn b/msc_tests/MSC_Tests.ttcn
index dea27a7..15ffc20 100644
--- a/msc_tests/MSC_Tests.ttcn
+++ b/msc_tests/MSC_Tests.ttcn
@@ -418,6 +418,18 @@
vc_conn.done;
 }
 
+private function f_tc_lu_imsi_auth_tmsi(charstring id, BSC_ConnHdlrPars pars) 
runs on BSC_ConnHdlr {
+   g_pars := pars;
+   f_perform_lu(true, true, true);
+}
+testcase TC_lu_imsi_auth_tmsi() runs on MTC_CT {
+   var BSC_ConnHdlr vc_conn;
+   f_init();
+
+   vc_conn := f_start_handler(refers(f_tc_lu_imsi_auth_tmsi), 
testcasename(), 5);
+   vc_conn.done;
+}
+
 
 /* Send CM SERVICE REQ for IMSI that has never performed LU before */
 private function f_tc_cmserv_imsi_unknown(charstring id, BSC_ConnHdlrPars pars)

-- 
To view, visit https://gerrit.osmocom.org/6024
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ea201bd603e581f199cd29056e7e7ebc9bd0923
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: msc_tests: Randomly generate Auth Vector (rather than hard-c...

2018-01-24 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: msc_tests: Randomly generate Auth Vector (rather than 
hard-coded value)
..


msc_tests: Randomly generate Auth Vector (rather than hard-coded value)

Change-Id: I2dc0570a8ae5003d26368b09d223db8e44a5c4ff
---
M msc_tests/BSC_ConnectionHandler.ttcn
1 file changed, 28 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/msc_tests/BSC_ConnectionHandler.ttcn 
b/msc_tests/BSC_ConnectionHandler.ttcn
index ee0e0ae..f9b4d3e 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -133,6 +133,30 @@
return l3_info;
 }
 
+type record AuthVector {
+   OCT16 rand,
+   OCT4 sres,
+   OCT8 kc
+   /* FIXME: 3G elements */
+}
+
+private function f_rnd_oct(integer len) return octetstring {
+   var integer i;
+   var octetstring res;
+   for (i := 0; i < len; i := i + 1) {
+   res[i] := int2oct(float2int(rnd()*256.0), 1);
+   }
+   return res;
+}
+
+function f_gen_auth_vec_2g() return AuthVector {
+   var AuthVector vec;
+   vec.rand := f_rnd_oct(16);
+   vec.sres := f_rnd_oct(4);
+   vec.kc := f_rnd_oct(8);
+   return vec;
+}
+
 function f_perform_lu(boolean expect_auth, boolean expect_tmsi, boolean 
send_early_cm)
 runs on BSC_ConnHdlr {
var PDU_ML3_MS_NW l3_lu := f_build_lu_imsi(g_pars.imsi)
@@ -149,15 +173,13 @@
}
 
if (expect_auth) {
-   var OCT16 rand := ''O;
-   var OCT4 sres := ''O;
-   var GSUP_IE auth_tuple := valueof(ts_GSUP_IE_AuthTuple2G(rand, 
sres,
-
''O));
+   var AuthVector vec := f_gen_auth_vec_2g();
+   var GSUP_IE auth_tuple := 
valueof(ts_GSUP_IE_AuthTuple2G(vec.rand, vec.sres, vec.kc));
GSUP.receive(tr_GSUP_SAI_REQ(g_pars.imsi));
GSUP.send(ts_GSUP_SAI_RES(g_pars.imsi, auth_tuple));
 
-   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_AUTH_REQ(rand)));
-   BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MT_MM_AUTH_RESP_2G(sres)));
+   BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_MM_AUTH_REQ(vec.rand)));
+   BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MT_MM_AUTH_RESP_2G(vec.sres)));
}
 
/* Expect MSC to perform LU with HLR */

-- 
To view, visit https://gerrit.osmocom.org/6025
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2dc0570a8ae5003d26368b09d223db8e44a5c4ff
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-ttcn3-hacks[master]: msc: Cosmetic (fix comment)

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6036
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I20c65454f606a5c3bc3c5a127ae02b6c204ca06e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: msc: Fix generation of IMSI/IMEI/MSISDN

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6039
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54d05e8ec7aeecc48666d3b369351212a6a0ea6f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: GSUP: Fix handling of odd-length IMSI and 0xF filler digit

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6040
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4e0a9f1236504ce6026c6e34fd97fda6fefa832c
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: MSC_Tests: More CM SERVICE REQ and EMERGENCY CALL related tests

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6029
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I04ca21824f66ad90d9dac2c25000ecd724aa4528
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: msc: Add TC_lu_disconnect: Start LU, then do a hard SCCP dis...

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6030
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I04d0b09350c6a1c9b8fb9aac87158a142d80f18f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: MSC: Add test for LU with 2G authentication

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6024
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5ea201bd603e581f199cd29056e7e7ebc9bd0923
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: WIP: MSC: Add MO call testing

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6022
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If32cb359b3cf732c4752856538552595dbbf2a8a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: MSC_Tests: Proper treatment of IMEI + TMSI

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6035
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I717f1c9ab21e5be8b88f10ce4e8c583b385f3664
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: Osmocom_VTY_Functions: Make prompt configurable

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6037
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iec846227e88b3dc0d3be9474b8b926719161c9ee
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: GSUP/L3: Add templates related to authentication

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6023
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id9566e3e075a8837e2e77a7c2b9d8f0f6e9b7554
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: msc_tests: Randomly generate Auth Vector (rather than hard-c...

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6025
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2dc0570a8ae5003d26368b09d223db8e44a5c4ff
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: msc: Add test case for LU with MI=IMEI (which is illegal)

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6028
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3c91a0ff212a70a8e03e0579f240a10bc4356f4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: msc: Add tests for HLR SAI timeout and HLR SAI error

2018-01-24 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/6026
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7f8c8ff9ccadd7b7b14cba12a34cebe6855a5367
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


  1   2   3   >