Build failure of network:osmocom:nightly/libosmo-netif in Debian_9.0/armv7l

2019-08-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/libosmo-netif/Debian_9.0/armv7l

Package network:osmocom:nightly/libosmo-netif failed to build in 
Debian_9.0/armv7l

Check out the package for editing:
  osc checkout network:osmocom:nightly libosmo-netif

Last lines of build log:
[  224s] | configure:12838: checking for doxygen
[  224s] | configure:12856: found /usr/bin/doxygen
[  224s] | configure:12869: result: /usr/bin/doxygen
[  224s] | configure:12996: checking that generated files are newer than 
configure
[  224s] | configure:13002: result: done
[  224s] | configure:13033: creating ./config.status
[  224s] | 
[  224s] | ## -- ##
[  224s] | ## Running config.status. ##
[  224s] | ## -- ##
[  224s] | 
[  224s] | This file was extended by libosmo-netif config.status 0.6.0, which 
was
[  224s] | generated by GNU Autoconf 2.69.  Invocation command line was
[  224s] | 
[  224s] |   CONFIG_FILES= 
[  224s] |   CONFIG_HEADERS  = 
[  224s] |   CONFIG_LINKS= 
[  224s] |   CONFIG_COMMANDS = 
[  224s] |   $ ./config.status 
[  224s] | 
[  224s] | on armbuild13
[  224s] | 
[  224s] | config.status:1121: creating libosmo-netif.pc
[  226s] | config.status:1121: [  191.046228] sysrq: SysRq : Power Off
[  226s] [  191.047936] reboot: Power down
[  226s] ### VM INTERACTION END ###
[  226s] 
[  226s] armbuild13 failed "build libosmo-netif_0.6.0.dsc" at Mon Aug 19 
01:45:58 UTC 2019.
[  226s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/osmo-trx in Debian_Unstable/x86_64

2019-08-18 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/osmo-trx/Debian_Unstable/x86_64

Package network:osmocom:nightly/osmo-trx failed to build in 
Debian_Unstable/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly osmo-trx

Last lines of build log:
[  453s] ar: `u' modifier ignored since `D' is the default (see `U')
[  453s] libtool: link: ranlib .libs/libtransceiver_common.a
[  453s] libtool: link: ( cd ".libs" && rm -f "libtransceiver_common.la" && ln 
-s "../libtransceiver_common.la" "libtransceiver_common.la" )
[  453s] /bin/bash ../libtool  --tag=CXX   --mode=link g++ -lpthread 
-I/usr/include/ -I/usr/include/ -I/usr/include/ -g -O2 
-fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat 
-Werror=format-security  -Wl,-z,relro -Wl,-z,now -o osmo-trx-uhd 
osmo_trx_uhd-osmo-trx.o ./device/uhd/libdevice.la libtransceiver_common.la 
../Transceiver52M/arch/x86/libarch.la ../GSM/libGSM.la 
../CommonLibs/libcommon.la -lfftw3f -ltalloc -losmocore -ltalloc -losmoctrl 
-losmogsm -losmocore -ltalloc -losmovty -losmocore -luhd 
[  453s] libtool: link: g++ -I/usr/include/ -I/usr/include/ -I/usr/include/ -g 
-O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong 
-Wformat -Werror=format-security -Wl,-z -Wl,relro -Wl,-z -Wl,now -o 
osmo-trx-uhd osmo_trx_uhd-osmo-trx.o  ./device/uhd/.libs/libdevice.a 
./.libs/libtransceiver_common.a ../Transceiver52M/arch/x86/.libs/libarch.a 
../GSM/.libs/libGSM.a ../CommonLibs/.libs/libcommon.a -lpthread -lfftw3f 
/usr/lib/x86_64-linux-gnu/libosmoctrl.so 
/usr/lib/x86_64-linux-gnu/libosmogsm.so -ltalloc 
/usr/lib/x86_64-linux-gnu/libosmovty.so 
/usr/lib/x86_64-linux-gnu/libosmocore.so -luhd
[  453s] /usr/bin/ld: ./device/uhd/.libs/libdevice.a(UHDDevice.o): undefined 
reference to symbol '_ZN5boost6system16generic_categoryEv'
[  453s] /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_system.so.1.67.0: 
error adding symbols: DSO missing from command line
[  453s] collect2: error: ld returned 1 exit status
[  453s] make[4]: *** [Makefile:681: osmo-trx-uhd] Error 1
[  453s] make[4]: Leaving directory '/usr/src/packages/BUILD/Transceiver52M'
[  453s] make[3]: *** [Makefile:820: all-recursive] Error 1
[  453s] make[3]: Leaving directory '/usr/src/packages/BUILD/Transceiver52M'
[  453s] make[2]: *** [Makefile:513: all-recursive] Error 1
[  453s] make[2]: Leaving directory '/usr/src/packages/BUILD'
[  453s] make[1]: *** [Makefile:444: all] Error 2
[  453s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  453s] dh_auto_build: make -j1 returned exit code 2
[  453s] make: *** [debian/rules:6: build] Error 255
[  453s] dpkg-buildpackage: error: debian/rules build subprocess returned exit 
status 2
[  453s] 
[  453s] morla3 failed "build osmo-trx_1.1.1.dsc" at Mon Aug 19 01:45:15 UTC 
2019.
[  453s] 
[  453s] ### VM INTERACTION START ###
[  457s] [  433.027751] sysrq: SysRq : Power Off
[  457s] [  433.035639] reboot: Power down
[  457s] ### VM INTERACTION END ###
[  457s] 
[  457s] morla3 failed "build osmo-trx_1.1.1.dsc" at Mon Aug 19 01:45:19 UTC 
2019.
[  457s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Change in ...osmo-ttcn3-hacks[master]: IPA_Emulation: Fix building without CTRL support

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15230 )

Change subject: IPA_Emulation: Fix building without CTRL support
..

IPA_Emulation: Fix building without CTRL support

Back in JUne, Change-Id I4d1eca6b0008a395b7f7449e6ea3f9b6d41133c7
attempted to introduce compilation of IPA_Emulation without CTRL but
it failed to cover all references to CTRL with the correspondign
ifdef/endif blocks.  Let's fix this.

Change-Id: I68349b32f613aacced84011601121f2265243600
---
M library/IPA_Emulation.ttcnpp
1 file changed, 9 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index 2305b7b..7b80c2d 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -51,8 +51,9 @@
 import from RSPRO_Types all;
 #endif

-
+#ifdef IPA_EMULATION_CTRL
 import from Osmocom_CTRL_Types all;
+#endif

 modulepar {
/* Use Osmocom extended IPA mux header */
@@ -146,10 +147,12 @@
 } with { extension "internal" }
 #endif

+#ifdef IPA_EMULATION_CTRL
 /* Client port for CTRL inside IPA */
 type port IPA_CTRL_PT message {
inout CtrlMessage, ASP_IPA_Event;
 } with { extension "internal" }
+#endif

 #ifdef IPA_EMULATION_GSUP
 /* Client port for CTRL inside IPA */
@@ -550,8 +553,10 @@
var ASP_Event asp_evt;
var Socket_API_Definitions.PortEvent port_evt;
var octetstring payload;
-   var CtrlMessage ctrl_msg;
var ASP_IPA_Unitdata ipa_ud;
+#ifdef IPA_EMULATION_CTRL
+   var CtrlMessage ctrl_msg;
+#endif
 #ifdef IPA_EMULATION_SCCP
var ASP_MTP3_TRANSFERreq mtp_req;
 #endif
@@ -631,9 +636,11 @@
f_mgcp_to_user(ipa_rx.msg);
}
 #endif
+#ifdef IPA_EMULATION_CTRL
case (IPAC_PROTO_EXT_CTRL) {
f_ctrl_to_user(ipa_rx.msg);
}
+#endif
 #ifdef IPA_EMULATION_GSUP
case (IPAC_PROTO_EXT_GSUP) {
f_gsup_to_user(ipa_rx.msg);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15230
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I68349b32f613aacced84011601121f2265243600
Gerrit-Change-Number: 15230
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: NAS_EPS: fix 'make deps' (no commit specified)

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15232 )

Change subject: NAS_EPS: fix 'make deps' (no commit specified)
..

NAS_EPS: fix 'make deps' (no commit specified)

Change-Id: I790c54568e745ea07afeed35b4d09a45b785711f
---
M deps/Makefile
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/deps/Makefile b/deps/Makefile
index ec37e7c..ed265c0 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -90,6 +90,7 @@
 titan.ProtocolModules.M2PA_commit= R.2.A
 titan.ProtocolModules.M3UA_commit= R.2.A
 titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A
+titan.ProtocolModules.NAS_EPS_15.2.0.1_commit= 
2ba853c7d197f7f39d97b76fca4726a7143fb4ad
 titan.ProtocolModules.NS_v7.3.0_commit=R.2.A
 titan.ProtocolModules.RTP_commit=  R.5.A
 titan.ProtocolModules.DIAMETER_ProtocolModule_Generator_commit=
ffd939595a08da1b8c8176aaa1f8578bfe02a912

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15232
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I790c54568e745ea07afeed35b4d09a45b785711f
Gerrit-Change-Number: 15232
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: DIAMETER_Emulation: Remove unused dependency to MobileL3 and DNS

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15231 )

Change subject: DIAMETER_Emulation: Remove unused dependency to MobileL3 and DNS
..

DIAMETER_Emulation: Remove unused dependency to MobileL3 and DNS

This is an artefact of copy+paste programming

Change-Id: I10d56ef9971149350812b1504844217195623bd8
---
M library/DIAMETER_Emulation.ttcn
1 file changed, 1 insertion(+), 5 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn
index dc7bc94..fad44c3 100644
--- a/library/DIAMETER_Emulation.ttcn
+++ b/library/DIAMETER_Emulation.ttcn
@@ -33,8 +33,6 @@
 import from DIAMETER_Templates all;
 import from Osmocom_Types all;
 import from IPL4asp_Types all;
-import from DNS_Helpers all;
-import from MobileL3_Types all;

 type hexstring IMSI;

@@ -46,7 +44,7 @@

 /* port between individual per-connection components and this dispatcher */
 type port DIAMETER_Conn_PT message {
-   inout PDU_DIAMETER, PDU_ML3_MS_NW, PDU_ML3_NW_MS;
+   inout PDU_DIAMETER;
 } with { extension "internal" };

 /* global test port e.g. for non-imsi/conn specific messages */
@@ -283,8 +281,6 @@

while (true) {
var DIAMETER_ConnHdlr vc_conn;
-   var PDU_ML3_MS_NW l3_mo;
-   var PDU_ML3_NW_MS l3_mt;
var template IMSI imsi_t;
var hexstring imsi;
var DIAMETER_RecvFrom mrf;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15231
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I10d56ef9971149350812b1504844217195623bd8
Gerrit-Change-Number: 15231
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: mme: Add missing link to DIAMETER_EncDec.cc from TITAN

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15229 )

Change subject: mme: Add missing link to DIAMETER_EncDec.cc from TITAN
..

mme: Add missing link to DIAMETER_EncDec.cc from TITAN

Change-Id: I9214ba6778ed6fc8c576e9d97217ecbb9996fb12
---
M deps/Makefile
M mme/gen_links.sh
2 files changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/deps/Makefile b/deps/Makefile
index 61afb37..ec37e7c 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -28,6 +28,7 @@
titan.ProtocolModules.TCP \
titan.ProtocolModules.UDP \
titan.ProtocolModules.RTP \
+   titan.ProtocolModules.DIAMETER_ProtocolModule_Generator 
\
titan.TestPorts.Common_Components.Socket-API \
titan.TestPorts.IPL4asp \
titan.TestPorts.LANL2asp \
@@ -91,6 +92,7 @@
 titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A
 titan.ProtocolModules.NS_v7.3.0_commit=R.2.A
 titan.ProtocolModules.RTP_commit=  R.5.A
+titan.ProtocolModules.DIAMETER_ProtocolModule_Generator_commit=
ffd939595a08da1b8c8176aaa1f8578bfe02a912
 titan.ProtocolModules.ROSE_commit= R.1.C
 titan.ProtocolModules.SCTP_commit= R.2.A
 titan.ProtocolModules.SGsAP_13.2.0_commit= 
520dc48dd41ee15c9fd77e71d2ea7a05c58770b9
diff --git a/mme/gen_links.sh b/mme/gen_links.sh
index b59410b..f22f1ca 100755
--- a/mme/gen_links.sh
+++ b/mme/gen_links.sh
@@ -43,6 +43,10 @@
 FILES="GTPC_EncDec.cc   GTPC_Types.ttcn  GTPU_EncDec.cc   GTPU_Types.ttcn"
 gen_links $DIR $FILES

+DIR=$BASEDIR/titan.ProtocolModules.DIAMETER_ProtocolModule_Generator/src
+FILES="DIAMETER_EncDec.cc"
+gen_links $DIR $FILES
+
 DIR=../library/s1ap
 FILES="S1AP_CommonDataTypes.asn S1AP_Constants.asn S1AP_Containers.asn 
S1AP_IEs.asn S1AP_PDU_Contents.asn
 S1AP_PDU_Descriptions.asn "

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15229
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9214ba6778ed6fc8c576e9d97217ecbb9996fb12
Gerrit-Change-Number: 15229
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: mme: Add missing link to DIAMETER_EncDec.cc from TITAN

2019-08-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15229 )

Change subject: mme: Add missing link to DIAMETER_EncDec.cc from TITAN
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15229
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9214ba6778ed6fc8c576e9d97217ecbb9996fb12
Gerrit-Change-Number: 15229
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sun, 18 Aug 2019 17:49:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: NAS_EPS: fix 'make deps' (no commit specified)

2019-08-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15232 )

Change subject: NAS_EPS: fix 'make deps' (no commit specified)
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15232
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I790c54568e745ea07afeed35b4d09a45b785711f
Gerrit-Change-Number: 15232
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sun, 18 Aug 2019 17:49:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: IPA_Emulation: Fix building without CTRL support

2019-08-18 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15230


Change subject: IPA_Emulation: Fix building without CTRL support
..

IPA_Emulation: Fix building without CTRL support

Back in JUne, Change-Id I4d1eca6b0008a395b7f7449e6ea3f9b6d41133c7
attempted to introduce compilation of IPA_Emulation without CTRL but
it failed to cover all references to CTRL with the correspondign
ifdef/endif blocks.  Let's fix this.

Change-Id: I68349b32f613aacced84011601121f2265243600
---
M library/IPA_Emulation.ttcnpp
1 file changed, 9 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/30/15230/1

diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index 2305b7b..7b80c2d 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -51,8 +51,9 @@
 import from RSPRO_Types all;
 #endif

-
+#ifdef IPA_EMULATION_CTRL
 import from Osmocom_CTRL_Types all;
+#endif

 modulepar {
/* Use Osmocom extended IPA mux header */
@@ -146,10 +147,12 @@
 } with { extension "internal" }
 #endif

+#ifdef IPA_EMULATION_CTRL
 /* Client port for CTRL inside IPA */
 type port IPA_CTRL_PT message {
inout CtrlMessage, ASP_IPA_Event;
 } with { extension "internal" }
+#endif

 #ifdef IPA_EMULATION_GSUP
 /* Client port for CTRL inside IPA */
@@ -550,8 +553,10 @@
var ASP_Event asp_evt;
var Socket_API_Definitions.PortEvent port_evt;
var octetstring payload;
-   var CtrlMessage ctrl_msg;
var ASP_IPA_Unitdata ipa_ud;
+#ifdef IPA_EMULATION_CTRL
+   var CtrlMessage ctrl_msg;
+#endif
 #ifdef IPA_EMULATION_SCCP
var ASP_MTP3_TRANSFERreq mtp_req;
 #endif
@@ -631,9 +636,11 @@
f_mgcp_to_user(ipa_rx.msg);
}
 #endif
+#ifdef IPA_EMULATION_CTRL
case (IPAC_PROTO_EXT_CTRL) {
f_ctrl_to_user(ipa_rx.msg);
}
+#endif
 #ifdef IPA_EMULATION_GSUP
case (IPAC_PROTO_EXT_GSUP) {
f_gsup_to_user(ipa_rx.msg);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15230
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I68349b32f613aacced84011601121f2265243600
Gerrit-Change-Number: 15230
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in ...osmo-ttcn3-hacks[master]: DIAMETER_Emulation: Remove unused dependency to MobileL3 and DNS

2019-08-18 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15231


Change subject: DIAMETER_Emulation: Remove unused dependency to MobileL3 and DNS
..

DIAMETER_Emulation: Remove unused dependency to MobileL3 and DNS

This is an artefact of copy+paste programming

Change-Id: I10d56ef9971149350812b1504844217195623bd8
---
M library/DIAMETER_Emulation.ttcn
1 file changed, 1 insertion(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/31/15231/1

diff --git a/library/DIAMETER_Emulation.ttcn b/library/DIAMETER_Emulation.ttcn
index dc7bc94..fad44c3 100644
--- a/library/DIAMETER_Emulation.ttcn
+++ b/library/DIAMETER_Emulation.ttcn
@@ -33,8 +33,6 @@
 import from DIAMETER_Templates all;
 import from Osmocom_Types all;
 import from IPL4asp_Types all;
-import from DNS_Helpers all;
-import from MobileL3_Types all;

 type hexstring IMSI;

@@ -46,7 +44,7 @@

 /* port between individual per-connection components and this dispatcher */
 type port DIAMETER_Conn_PT message {
-   inout PDU_DIAMETER, PDU_ML3_MS_NW, PDU_ML3_NW_MS;
+   inout PDU_DIAMETER;
 } with { extension "internal" };

 /* global test port e.g. for non-imsi/conn specific messages */
@@ -283,8 +281,6 @@

while (true) {
var DIAMETER_ConnHdlr vc_conn;
-   var PDU_ML3_MS_NW l3_mo;
-   var PDU_ML3_NW_MS l3_mt;
var template IMSI imsi_t;
var hexstring imsi;
var DIAMETER_RecvFrom mrf;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15231
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I10d56ef9971149350812b1504844217195623bd8
Gerrit-Change-Number: 15231
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in ...osmo-ttcn3-hacks[master]: NAS_EPS: fix 'make deps' (no commit specified)

2019-08-18 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15232


Change subject: NAS_EPS: fix 'make deps' (no commit specified)
..

NAS_EPS: fix 'make deps' (no commit specified)

Change-Id: I790c54568e745ea07afeed35b4d09a45b785711f
---
M deps/Makefile
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/32/15232/1

diff --git a/deps/Makefile b/deps/Makefile
index ec37e7c..ed265c0 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -90,6 +90,7 @@
 titan.ProtocolModules.M2PA_commit= R.2.A
 titan.ProtocolModules.M3UA_commit= R.2.A
 titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A
+titan.ProtocolModules.NAS_EPS_15.2.0.1_commit= 
2ba853c7d197f7f39d97b76fca4726a7143fb4ad
 titan.ProtocolModules.NS_v7.3.0_commit=R.2.A
 titan.ProtocolModules.RTP_commit=  R.5.A
 titan.ProtocolModules.DIAMETER_ProtocolModule_Generator_commit=
ffd939595a08da1b8c8176aaa1f8578bfe02a912

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15232
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I790c54568e745ea07afeed35b4d09a45b785711f
Gerrit-Change-Number: 15232
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in ...osmo-ttcn3-hacks[master]: mme: Add missing link to DIAMETER_EncDec.cc from TITAN

2019-08-18 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15229


Change subject: mme: Add missing link to DIAMETER_EncDec.cc from TITAN
..

mme: Add missing link to DIAMETER_EncDec.cc from TITAN

Change-Id: I9214ba6778ed6fc8c576e9d97217ecbb9996fb12
---
M deps/Makefile
M mme/gen_links.sh
2 files changed, 6 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/29/15229/1

diff --git a/deps/Makefile b/deps/Makefile
index 61afb37..ec37e7c 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -28,6 +28,7 @@
titan.ProtocolModules.TCP \
titan.ProtocolModules.UDP \
titan.ProtocolModules.RTP \
+   titan.ProtocolModules.DIAMETER_ProtocolModule_Generator 
\
titan.TestPorts.Common_Components.Socket-API \
titan.TestPorts.IPL4asp \
titan.TestPorts.LANL2asp \
@@ -91,6 +92,7 @@
 titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A
 titan.ProtocolModules.NS_v7.3.0_commit=R.2.A
 titan.ProtocolModules.RTP_commit=  R.5.A
+titan.ProtocolModules.DIAMETER_ProtocolModule_Generator_commit=
ffd939595a08da1b8c8176aaa1f8578bfe02a912
 titan.ProtocolModules.ROSE_commit= R.1.C
 titan.ProtocolModules.SCTP_commit= R.2.A
 titan.ProtocolModules.SGsAP_13.2.0_commit= 
520dc48dd41ee15c9fd77e71d2ea7a05c58770b9
diff --git a/mme/gen_links.sh b/mme/gen_links.sh
index b59410b..f22f1ca 100755
--- a/mme/gen_links.sh
+++ b/mme/gen_links.sh
@@ -43,6 +43,10 @@
 FILES="GTPC_EncDec.cc   GTPC_Types.ttcn  GTPU_EncDec.cc   GTPU_Types.ttcn"
 gen_links $DIR $FILES

+DIR=$BASEDIR/titan.ProtocolModules.DIAMETER_ProtocolModule_Generator/src
+FILES="DIAMETER_EncDec.cc"
+gen_links $DIR $FILES
+
 DIR=../library/s1ap
 FILES="S1AP_CommonDataTypes.asn S1AP_Constants.asn S1AP_Containers.asn 
S1AP_IEs.asn S1AP_PDU_Contents.asn
 S1AP_PDU_Descriptions.asn "

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15229
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9214ba6778ed6fc8c576e9d97217ecbb9996fb12
Gerrit-Change-Number: 15229
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


Change in ...osmo-ttcn3-hacks[master]: mme: Integrate DIAMETER support into MME testsuite

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15207 )

Change subject: mme: Integrate DIAMETER support into MME testsuite
..

mme: Integrate DIAMETER support into MME testsuite

The test suite can now send/receive DIAMETER messages via related test
ports.

Change-Id: I1691f87e19cced79ab0f9c3bb87608fc63e21eab
---
M mme/MME_Tests.ttcn
M mme/gen_links.sh
M mme/regen_makefile.sh
3 files changed, 115 insertions(+), 4 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn
index ae71173..da45485 100644
--- a/mme/MME_Tests.ttcn
+++ b/mme/MME_Tests.ttcn
@@ -21,6 +21,10 @@
 import from NAS_EPS_Types all;
 import from NAS_Templates all;

+import from DIAMETER_Types all;
+import from DIAMETER_Templates all;
+import from DIAMETER_Emulation all;
+
 import from SGsAP_Types all;
 import from SGsAP_Templates all;
 import from SGsAP_Emulation all;
@@ -58,6 +62,11 @@
port S1AP_PT S1AP_UNIT[NUM_ENB];
port S1APEM_PROC_PT S1AP_PROC[NUM_ENB];

+   /* S6a/S6d interface of emulated HSS */
+   var DIAMETER_Emulation_CT vc_DIAMETER;
+   port DIAMETER_PT DIAMETER_UNIT;
+   port DIAMETEREM_PROC_PT DIAMETER_PROC;
+
/* SGs interface of emulated MSC/VLR */
var SGsAP_Emulation_CT vc_SGsAP;
port SGsAP_PT SGsAP_UNIT;
@@ -66,7 +75,7 @@
var UeParams g_ue_pars[NUM_UE];
 }

-type component ConnHdlr extends S1AP_ConnHdlr, SGsAP_ConnHdlr {
+type component ConnHdlr extends S1AP_ConnHdlr, SGsAP_ConnHdlr, 
DIAMETER_ConnHdlr {
var ConnHdlrPars g_pars;
timer g_Tguard := 30.0;
 }
@@ -87,6 +96,10 @@
charstring mp_s1_local_ip := "127.0.0.1";
integer mp_s1_local_port := 5;

+   /* S6 interface */
+   charstring mp_s6_local_ip := "127.0.0.4";
+   integer mp_s6_local_port := 3868;
+
/* SGs interface */
charstring mp_sgs_local_ip := "127.0.0.1";
integer mp_sgs_local_port := 29118;
@@ -191,6 +204,30 @@
}
 }

+friend function DiameterForwardUnitdataCallback(PDU_DIAMETER msg)
+runs on DIAMETER_Emulation_CT return template PDU_DIAMETER {
+   DIAMETER_UNIT.send(msg);
+   return omit;
+}
+
+friend function f_init_diameter(charstring id) runs on MTC_CT {
+   var DIAMETEROps ops := {
+   create_cb := refers(DIAMETER_Emulation.ExpectedCreateCallback),
+   unitdata_cb := refers(DiameterForwardUnitdataCallback)
+   };
+   var DIAMETER_conn_parameters pars := {
+   remote_ip := mp_mme_ip,
+   remote_sctp_port := -1,
+   local_ip := mp_s6_local_ip,
+   local_sctp_port := mp_s6_local_port
+   };
+   vc_DIAMETER := DIAMETER_Emulation_CT.create(id);
+   map(vc_DIAMETER:DIAMETER, system:DIAMETER_CODEC_PT);
+   connect(vc_DIAMETER:DIAMETER_UNIT, self:DIAMETER_UNIT);
+   connect(vc_DIAMETER:DIAMETER_PROC, self:DIAMETER_PROC);
+   vc_DIAMETER.start(DIAMETER_Emulation.main(ops, pars, id));
+}
+
 friend template (value) TAI ts_enb_S1AP_TAI(EnbParams enb) := {
pLMNidentity := enb.global_enb_id.pLMNidentity,
tAC := enb.supported_tas[0].tAC,
@@ -232,6 +269,10 @@
connect(vc_conn:SGsAP, vc_SGsAP:SGsAP_CLIENT);
connect(vc_conn:SGsAP_PROC, vc_SGsAP:SGsAP_PROC);
}
+   if (isbound(vc_DIAMETER)) {
+   connect(vc_conn:DIAMETER, vc_DIAMETER:DIAMETER_CLIENT);
+   connect(vc_conn:DIAMETER_PROC, vc_DIAMETER:DIAMETER_PROC);
+   }

/* We cannot use vc_conn.start(f_init_handler(fn, id, pars)); as we 
cannot have
 * a stand-alone 'derefers()' call, see 
https://www.eclipse.org/forums/index.php/t/1091364/ */
@@ -253,6 +294,9 @@
/* start guard timre and activate it as default */
g_Tguard.start(t_guard);
activate(as_Tguard());
+   if (DIAMETER_PROC.checkstate("Connected")) {
+   f_diameter_expect(g_pars.ue_pars.imsi);
+   }
if (SGsAP_PROC.checkstate("Connected")) {
/* Route all SGsAP mesages for our IMSIto us */
f_create_sgsap_expect(pars.ue_pars.imsi);
@@ -414,9 +458,64 @@
}
 }

+/* Exepect AuthInfoReq (AIR) from HSS; respond with AuthInforAnswer (AIA) */
+private altstep as_DIA_AuthInfo() runs on ConnHdlr {
+   var PDU_DIAMETER rx_dia;
+   [] DIAMETER.receive(tr_DIA_AIR(g_pars.ue_pars.imsi)) -> value rx_dia {
+   var template (omit) AVP avp;
+   var octetstring sess_id;
+   var octetstring vplmn_id;
+   var hexstring imsi;
+   var template (value) AVP_list auth_info_content;
+
+   /* retrieve input data */
+   imsi := valueof(f_DIAMETER_get_imsi(rx_dia));
+   avp := f_DIAMETER_get_avp(rx_dia, 
c_AVP_Code_BASE_NONE_Session_Id);
+ 

Change in ...osmo-ttcn3-hacks[master]: library: Add initial set of LTE/EPC NAS templates

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15197 )

Change subject: library: Add initial set of LTE/EPC NAS templates
..

library: Add initial set of LTE/EPC NAS templates

Change-Id: I53a598011041d642f03dcd9cca128f4e9da4adfd
---
M deps/Makefile
A library/NAS_Templates.ttcn
M mme/gen_links.sh
3 files changed, 1,017 insertions(+), 0 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/deps/Makefile b/deps/Makefile
index cdca8f1..61afb37 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -51,6 +51,7 @@
titan.ProtocolModules.GTPv2_v13.7.0 \
titan.ProtocolModules.ISUP_Q.762 \
titan.ProtocolModules.MobileL3_v13.4.0 \
+   titan.ProtocolModules.NAS_EPS_15.2.0.1 \
titan.ProtocolModules.NS_v7.3.0 \
titan.ProtocolModules.SNDCP_v7.0.0 \
titan.ProtocolEmulations.SCCP
diff --git a/library/NAS_Templates.ttcn b/library/NAS_Templates.ttcn
new file mode 100644
index 000..f819862
--- /dev/null
+++ b/library/NAS_Templates.ttcn
@@ -0,0 +1,1011 @@
+/* EPC (Evolved Packet Core) NAS (Non-Access Stratum) templates in TTCN-3
+ * (C) 2019 Harald Welte 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+module NAS_Templates {
+
+import from General_Types all;
+import from NAS_EPS_Types all;
+
+template (value) PDU_NAS_EPS
+ts_NAS_SM(template (value) EPS_SessionManagement sm) := {
+   protocolDiscriminator := '0010'B,
+   ePS_messages := {
+   ePS_SessionManagement := sm
+   }
+}
+template (present) PDU_NAS_EPS
+tr_NAS_SM(template (present) EPS_SessionManagement sm) := {
+   protocolDiscriminator := '0010'B,
+   ePS_messages := {
+   ePS_SessionManagement := sm
+   }
+}
+
+template (value) PDU_NAS_EPS
+ts_NAS_MM(template (value) EPS_MobilityManagement mm) := {
+   protocolDiscriminator := c_EPS_NAS_PD_EMM,
+   ePS_messages := {
+   ePS_MobilityManagement := mm
+   }
+}
+template (present) PDU_NAS_EPS
+tr_NAS_MM(template (present) EPS_MobilityManagement mm) := {
+   protocolDiscriminator := c_EPS_NAS_PD_EMM,
+   ePS_messages := {
+   ePS_MobilityManagement := mm
+   }
+}
+
+const BIT4 c_EPS_SEC_NONE := ''B;
+const BIT4 c_EPS_NAS_PD_EMM := '0111'B;
+const BIT4 c_EPS_NAS_PD_ESM := '0010'B;
+
+private template (value) ESM_MessageContainerLVE
+ts_NAS_EsmMsgContLVE(template (value) octetstring inp) := {
+   lengthIndicator := 0,
+   content := inp
+}
+private template (present) ESM_MessageContainerLVE
+tr_NAS_EsmMsgContLVE(template (present) octetstring inp) := {
+   lengthIndicator := ?,
+   content := inp
+}
+
+private template (value) MobileIdentityLV
+ts_NAS_MobileIdLV(template (value) MobileIdentityV mid) := {
+   lengthIndicator := 0,
+   mobileIdentityV := mid
+}
+private template (present) MobileIdentityLV
+tr_NAS_MobileIdLV(template (present) MobileIdentityV mid) := {
+   lengthIndicator := ?,
+   mobileIdentityV := mid
+}
+
+private function f_enc_IMSI_NAS(hexstring digits) return IMSI {
+   var IMSI l3;
+   var integer len := lengthof(digits);
+   if (len rem 2 == 1) {   /* modulo remainder */
+   l3.oddevenIndicator := '1'B;
+   l3.fillerDigit := omit;
+   } else {
+   l3.oddevenIndicator := '0'B;
+   l3.fillerDigit := ''B;
+   }
+   l3.digits := digits;
+   return l3;
+}
+
+private function f_enc_IMEI_NAS(hexstring digits) return IMEI {
+   var IMEI 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;
+}
+
+private function f_enc_IMEI_SV(hexstring digits) return IMEI_SV {
+   var IMEI_SV 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;
+   l3.fillerDigit := ''B;
+   return l3;
+}
+
+template (value) GUTI ts_NAS_GUTI(hexstring mcc_mnc, OCT2 mmegi, OCT1 mmec, 
OCT4 tmsi) := {
+   oddevenIndicator := '0'B,
+   spare := ''B,
+   /* mcc_mnc specified in format 262f42 */
+   mccDigit1 := mcc_mnc[0],
+   mccDigit2 := mcc_mnc[1],
+   mccDigit3 := mcc_mnc[2],
+   mncDigit3 := mcc_mnc[5],
+   mncDigit1 := mcc_mnc[3],
+   mncDigit2 := mcc_mnc[4],
+   mMEGI := mmegi,
+  

Change in ...osmo-ttcn3-hacks[master]: library: Add S1AP CodecPort/Emulation

2019-08-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15196 )

Change subject: library: Add S1AP CodecPort/Emulation
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15196
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9bfba3ab2a3830e590b203c44c03b9c9383fff99
Gerrit-Change-Number: 15196
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sun, 18 Aug 2019 17:13:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: library: Add [generated] DIAMETER_Types.ttcn

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15205 )

Change subject: library: Add [generated] DIAMETER_Types.ttcn
..

library: Add [generated] DIAMETER_Types.ttcn

The way how the TITAN support for DIAMETER works, is that there's
an awk-based shell script and lots of DIAMETER dictionaries in the
https://github.com/eclipse/titan.ProtocolModules.DIAMETER_ProtocolModule_Generator
repository.

I've used 'AVP.sh Base_IETF_RFC3588.ddf BaseTypes_IETF_RFC3588.ddf
AAAInterface_3GPP_TS29272_f10.ddf GxInterface_PCC_3GPP_TS29212_f10.ddf
S6Interfaces_3GPP_TS29336_f00.ddf MobileIPv6_HA_IETF_RFC5778.ddf
RxInterface_PCC_3GPP_TS29214_f20.ddf' to generate the DIAMETER_Types
file we use here.

DIAMETER is used as signaling protocol between the HSS and other core
element nodes in the EPC, such as the MME and S-GW.

Change-Id: I85834e98e238b7ff6058264a0f365d05c15cd669
---
A library/DIAMETER_Types.ttcn
1 file changed, 6,652 insertions(+), 0 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified




--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15205
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I85834e98e238b7ff6058264a0f365d05c15cd669
Gerrit-Change-Number: 15205
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: TTCN-3 native function wrapper for SNOW-3G

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15202 )

Change subject: TTCN-3 native function wrapper for SNOW-3G
..

TTCN-3 native function wrapper for SNOW-3G

Change-Id: I7fca69ea8b4aed48d5a64885b762ab85be71ef03
---
A mme/LTE_CryptoFunctionDefs.cc
A mme/LTE_CryptoFunctions.ttcn
A mme/key_derivation.c
A mme/key_derivation.h
M mme/regen_makefile.sh
5 files changed, 557 insertions(+), 2 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/mme/LTE_CryptoFunctionDefs.cc b/mme/LTE_CryptoFunctionDefs.cc
new file mode 100644
index 000..da2d521
--- /dev/null
+++ b/mme/LTE_CryptoFunctionDefs.cc
@@ -0,0 +1,189 @@
+/* Utility functions from ogslib imported to TTCN-3
+ *
+ * (C) 2019 Harald Welte 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include "snow-3g.h"
+#include "key_derivation.h"
+
+//#define DEBUG
+
+#ifdef DEBUG
+static __thread char hexd_buff[4096];
+static const char hex_chars[] = "0123456789abcdef";
+
+static const char *_osmo_hexdump_buf(char *out_buf, size_t out_buf_size, const 
unsigned char *buf, int len, const char *delim,
+bool delim_after_last)
+{
+   int i;
+   char *cur = out_buf;
+   size_t delim_len;
+
+   if (!out_buf || !out_buf_size)
+   return "";
+
+   delim = delim ? : "";
+   delim_len = strlen(delim);
+
+   for (i = 0; i < len; i++) {
+   const char *delimp = delim;
+   int len_remain = out_buf_size - (cur - out_buf) - 1;
+   if (len_remain < (2 + delim_len)
+   && !(!delim_after_last && i == (len - 1) && len_remain >= 
2))
+   break;
+
+   *cur++ = hex_chars[buf[i] >> 4];
+   *cur++ = hex_chars[buf[i] & 0xf];
+
+   if (i == (len - 1) && !delim_after_last)
+   break;
+
+   while (len_remain > 1 && *delimp) {
+   *cur++ = *delimp++;
+   len_remain--;
+   }
+   }
+   *cur = '\0';
+   return out_buf;
+}
+
+static char *_osmo_hexdump(const unsigned char *buf, int len)
+{
+   _osmo_hexdump_buf(hexd_buff, sizeof(hexd_buff), buf, len, "", true);
+   return hexd_buff;
+}
+#endif
+
+namespace LTE__CryptoFunctions {
+
+
+/* f8.
+* Input key: 128 bit Confidentiality Key as OCT16.
+* Input count:32-bit Count, Frame dependent input as INTEGER.
+* Input bearer: 5-bit Bearer identity (in the LSB side) as BIT5.
+* Input is_dlwnlink: Direction of transmission.
+* Input data: length number of bits, input bit stream as OCTETSTRING.
+* Output data: Output bit stream. Assumes data is suitably memory
+* allocated.
+* Encrypts/decrypts blocks of data between 1 and 2^32 bits in length as
+* defined in Section 3.
+*/
+OCTETSTRING f__snow__3g__f8(const OCTETSTRING& key, const INTEGER& count, 
const INTEGER & bearer,
+   const BOOLEAN& is_downlink, const OCTETSTRING& data)
+{
+   TTCN_Buffer ttcn_buf_data(data);
+   TTCN_Buffer ttcn_buf_key(key);
+   uint32_t direction = (uint32_t)is_downlink;
+
+   snow_3g_f8((u8 *)ttcn_buf_key.get_data(), (u32) count, (u32)bearer, 
direction,
+  (u8 *)ttcn_buf_data.get_data(), ttcn_buf_data.get_len());
+
+   return OCTETSTRING(ttcn_buf_data.get_len(), ttcn_buf_data.get_data());
+}
+
+/* f9.
+* Input key: 128 bit Integrity Key as OCT16.
+* Input count:32-bit Count, Frame dependent input as UINT32.
+* Input fresh: 32-bit Random number as UINT32.
+* Input is_downlink:1 Direction of transmission.
+* Input data: input bit stream.
+* Output : 32 bit block used as MAC
+* Generates 32-bit MAC using UIA2 algorithm as defined in Section 4.
+*/
+
+OCTETSTRING f__snow__3g__f9(const OCTETSTRING& key, const INTEGER& count, 
const INTEGER& fresh,
+   const BOOLEAN& is_downlink, const OCTETSTRING& data)
+{
+   TTCN_Buffer ttcn_buf_data(data);
+   TTCN_Buffer ttcn_buf_key(key);
+   uint32_t direction = (uint32_t)is_downlink;
+   uint8_t tmp[4];
+   TTCN_Buffer ttcn_buf_mac;
+
+#ifdef DEBUG
+   printf("F9: key=%s, count=%u, fresh=%u, direction=%u, ",
+   _osmo_hexdump((u8 *)ttcn_buf_key.get_data(), 
ttcn_buf_key.get_len()), (u32) count,
+   (u32) fresh, direction);
+   printf("data=%s -> ", _osmo_hexdump(ttcn_buf_data.get_data(), 
ttcn_buf_data.get_len()));
+#endif
+   snow_3g_f9((u8 *)ttcn_buf_key.get_data(), (u32) count, (u32) fresh, 
direction,
+  (u8 *)ttcn_buf_data.get_data(), ttcn_buf_data.get_len()*8, 
tmp);
+#ifdef DEBUG
+   

Change in ...osmo-ttcn3-hacks[master]: Import snow-3g.[ch] from nextepc source code

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15198 )

Change subject: Import snow-3g.[ch] from nextepc source code
..

Import snow-3g.[ch] from nextepc source code

Change-Id: I938de2ad17210aa1561240c0a96d0df216243be1
---
A mme/snow-3g.c
A mme/snow-3g.h
2 files changed, 660 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/mme/snow-3g.c b/mme/snow-3g.c
new file mode 100644
index 000..4c728fe
--- /dev/null
+++ b/mme/snow-3g.c
@@ -0,0 +1,592 @@
+/*
+* SNOW_3G.c
+**/
+
+#include "snow-3g.h"
+
+/* LFSR */
+
+static u32 LFSR_S0 = 0x00;
+static u32 LFSR_S1 = 0x00;
+static u32 LFSR_S2 = 0x00;
+static u32 LFSR_S3 = 0x00;
+static u32 LFSR_S4 = 0x00;
+static u32 LFSR_S5 = 0x00;
+static u32 LFSR_S6 = 0x00;
+static u32 LFSR_S7 = 0x00;
+static u32 LFSR_S8 = 0x00;
+static u32 LFSR_S9 = 0x00;
+static u32 LFSR_S10 = 0x00;
+static u32 LFSR_S11 = 0x00;
+static u32 LFSR_S12 = 0x00;
+static u32 LFSR_S13 = 0x00;
+static u32 LFSR_S14 = 0x00;
+static u32 LFSR_S15 = 0x00;
+
+/* FSM */
+
+static u32 FSM_R1 = 0x00;
+static u32 FSM_R2 = 0x00;
+static u32 FSM_R3 = 0x00;
+
+/* Rijndael S-box SR */
+
+static u8 SR[256] = {
+0x63,0x7C,0x77,0x7B,0xF2,0x6B,0x6F,0xC5,0x30,0x01,0x67,0x2B,0xFE,0xD7,0xAB,0x76,
+0xCA,0x82,0xC9,0x7D,0xFA,0x59,0x47,0xF0,0xAD,0xD4,0xA2,0xAF,0x9C,0xA4,0x72,0xC0,
+0xB7,0xFD,0x93,0x26,0x36,0x3F,0xF7,0xCC,0x34,0xA5,0xE5,0xF1,0x71,0xD8,0x31,0x15,
+0x04,0xC7,0x23,0xC3,0x18,0x96,0x05,0x9A,0x07,0x12,0x80,0xE2,0xEB,0x27,0xB2,0x75,
+0x09,0x83,0x2C,0x1A,0x1B,0x6E,0x5A,0xA0,0x52,0x3B,0xD6,0xB3,0x29,0xE3,0x2F,0x84,
+0x53,0xD1,0x00,0xED,0x20,0xFC,0xB1,0x5B,0x6A,0xCB,0xBE,0x39,0x4A,0x4C,0x58,0xCF,
+0xD0,0xEF,0xAA,0xFB,0x43,0x4D,0x33,0x85,0x45,0xF9,0x02,0x7F,0x50,0x3C,0x9F,0xA8,
+0x51,0xA3,0x40,0x8F,0x92,0x9D,0x38,0xF5,0xBC,0xB6,0xDA,0x21,0x10,0xFF,0xF3,0xD2,
+0xCD,0x0C,0x13,0xEC,0x5F,0x97,0x44,0x17,0xC4,0xA7,0x7E,0x3D,0x64,0x5D,0x19,0x73,
+0x60,0x81,0x4F,0xDC,0x22,0x2A,0x90,0x88,0x46,0xEE,0xB8,0x14,0xDE,0x5E,0x0B,0xDB,
+0xE0,0x32,0x3A,0x0A,0x49,0x06,0x24,0x5C,0xC2,0xD3,0xAC,0x62,0x91,0x95,0xE4,0x79,
+0xE7,0xC8,0x37,0x6D,0x8D,0xD5,0x4E,0xA9,0x6C,0x56,0xF4,0xEA,0x65,0x7A,0xAE,0x08,
+0xBA,0x78,0x25,0x2E,0x1C,0xA6,0xB4,0xC6,0xE8,0xDD,0x74,0x1F,0x4B,0xBD,0x8B,0x8A,
+0x70,0x3E,0xB5,0x66,0x48,0x03,0xF6,0x0E,0x61,0x35,0x57,0xB9,0x86,0xC1,0x1D,0x9E,
+0xE1,0xF8,0x98,0x11,0x69,0xD9,0x8E,0x94,0x9B,0x1E,0x87,0xE9,0xCE,0x55,0x28,0xDF,
+0x8C,0xA1,0x89,0x0D,0xBF,0xE6,0x42,0x68,0x41,0x99,0x2D,0x0F,0xB0,0x54,0xBB,0x16
+};
+
+/* S-box SQ */
+
+static u8 SQ[256] = {
+0x25,0x24,0x73,0x67,0xD7,0xAE,0x5C,0x30,0xA4,0xEE,0x6E,0xCB,0x7D,0xB5,0x82,0xDB,
+0xE4,0x8E,0x48,0x49,0x4F,0x5D,0x6A,0x78,0x70,0x88,0xE8,0x5F,0x5E,0x84,0x65,0xE2,
+0xD8,0xE9,0xCC,0xED,0x40,0x2F,0x11,0x28,0x57,0xD2,0xAC,0xE3,0x4A,0x15,0x1B,0xB9,
+0xB2,0x80,0x85,0xA6,0x2E,0x02,0x47,0x29,0x07,0x4B,0x0E,0xC1,0x51,0xAA,0x89,0xD4,
+0xCA,0x01,0x46,0xB3,0xEF,0xDD,0x44,0x7B,0xC2,0x7F,0xBE,0xC3,0x9F,0x20,0x4C,0x64,
+0x83,0xA2,0x68,0x42,0x13,0xB4,0x41,0xCD,0xBA,0xC6,0xBB,0x6D,0x4D,0x71,0x21,0xF4,
+0x8D,0xB0,0xE5,0x93,0xFE,0x8F,0xE6,0xCF,0x43,0x45,0x31,0x22,0x37,0x36,0x96,0xFA,
+0xBC,0x0F,0x08,0x52,0x1D,0x55,0x1A,0xC5,0x4E,0x23,0x69,0x7A,0x92,0xFF,0x5B,0x5A,
+0xEB,0x9A,0x1C,0xA9,0xD1,0x7E,0x0D,0xFC,0x50,0x8A,0xB6,0x62,0xF5,0x0A,0xF8,0xDC,
+0x03,0x3C,0x0C,0x39,0xF1,0xB8,0xF3,0x3D,0xF2,0xD5,0x97,0x66,0x81,0x32,0xA0,0x00,
+0x06,0xCE,0xF6,0xEA,0xB7,0x17,0xF7,0x8C,0x79,0xD6,0xA7,0xBF,0x8B,0x3F,0x1F,0x53,
+0x63,0x75,0x35,0x2C,0x60,0xFD,0x27,0xD3,0x94,0xA5,0x7C,0xA1,0x05,0x58,0x2D,0xBD,
+0xD9,0xC7,0xAF,0x6B,0x54,0x0B,0xE0,0x38,0x04,0xC8,0x9D,0xE7,0x14,0xB1,0x87,0x9C,
+0xDF,0x6F,0xF9,0xDA,0x2A,0xC4,0x59,0x16,0x74,0x91,0xAB,0x26,0x61,0x76,0x34,0x2B,
+0xAD,0x99,0xFB,0x72,0xEC,0x33,0x12,0xDE,0x98,0x3B,0xC0,0x9B,0x3E,0x18,0x10,0x3A,
+0x56,0xE1,0x77,0xC9,0x1E,0x9E,0x95,0xA3,0x90,0x19,0xA8,0x6C,0x09,0xD0,0xF0,0x86
+};
+
+/* MULx.
+* Input V: an 8-bit input.
+* Input c: an 8-bit input.
+* Output : an 8-bit output.
+* See section 3.1.1 for details.
+*/
+
+u8 MULx(u8 V, u8 c)
+{
+   if ( V & 0x80 )
+   return ( (V << 1) ^ c);
+   else
+   return ( V << 1);
+}
+
+/* MULxPOW.
+* Input V: an 8-bit input.
+* Input i: a positive integer.
+* Input c: an 8-bit input.
+* Output : an 8-bit output.
+* See section 3.1.2 for details.
+*/
+
+u8 MULxPOW(u8 V, u8 i, u8 c)
+{
+   if ( i == 0)
+   return V;
+   else
+   return MULx( MULxPOW( V, i-1, c ), c);
+}
+
+/* The function MUL alpha.
+* Input c: 8-bit input.
+* Output : 32-bit output.
+* See section 3.4.2 for details.
+*/
+
+u32 MULalpha(u8 c)
+{
+   return ( ( ((u32)MULxPOW(c, 23, 0xa9)) << 24 ) |
+   

Change in ...osmo-ttcn3-hacks[master]: remove ogslib dependency from snow

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15201 )

Change subject: remove ogslib dependency from snow
..

remove ogslib dependency from snow

* don't use ogslib specific header files
* don't use ogs_{malloc,free} but simply use the stack

Change-Id: I5604c594934b03d2fd83e1e465fc150fc542a475
---
M mme/snow-3g.c
M mme/snow-3g.h
2 files changed, 2 insertions(+), 5 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/mme/snow-3g.c b/mme/snow-3g.c
index 992b107..60bdffd 100644
--- a/mme/snow-3g.c
+++ b/mme/snow-3g.c
@@ -381,7 +381,7 @@
int n = ( length + 31 ) / 32;
int i=0;
int lastbits = (8-(length%8)) % 8;
-   u32 *KS;
+   u32 KS[n];

/*Initialisation*/
/* Load the confidentiality key for SNOW 3G initialization as in section
@@ -399,7 +399,6 @@

/* Run SNOW 3G algorithm to generate sequence of key stream bits KS*/
snow_3g_initialize(K,IV);
-   KS = (u32 *)ogs_malloc(4*n);
snow_3g_generate_key_stream(n,(u32*)KS);

/* Exclusive-OR the input data with keystream to generate the output bit
@@ -412,8 +411,6 @@
data[4*i+3] ^= (u8) (KS[i] ) & 0xff;
}

-   ogs_free(KS);
-
/* zero last bits of data in case its length is not byte-aligned
   this is an addition to the C reference code, which did not handle it 
*/
if (lastbits)
diff --git a/mme/snow-3g.h b/mme/snow-3g.h
index a5320bb..0ba6a84 100644
--- a/mme/snow-3g.h
+++ b/mme/snow-3g.h
@@ -1,7 +1,7 @@
 #ifndef __SNOW_3G__
 #define __SNOW_3G__

-#include "ogs-core.h"
+#include 

 #ifdef __cplusplus
 extern "C" {

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15201
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5604c594934b03d2fd83e1e465fc150fc542a475
Gerrit-Change-Number: 15201
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: mme: Extend MME tests to also include S1AP interface testing

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15203 )

Change subject: mme: Extend MME tests to also include S1AP interface testing
..

mme: Extend MME tests to also include S1AP interface testing

The tests so far only tested SGsAP alone, which doesn't get us very
far.  Let's add interfacing with the S1, too.

Change-Id: Id54071b901db720a0f88b91cdc5a8e09bea0fb58
---
A mme/MME_Tests.cfg
A mme/MME_Tests.default
M mme/MME_Tests.ttcn
M mme/MME_Tests_SGsAP.ttcn
M mme/gen_links.sh
M mme/regen_makefile.sh
6 files changed, 399 insertions(+), 25 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/mme/MME_Tests.cfg b/mme/MME_Tests.cfg
new file mode 100644
index 000..3e478c3
--- /dev/null
+++ b/mme/MME_Tests.cfg
@@ -0,0 +1,18 @@
+[ORDERED_INCLUDE]
+# Common configuration, shared between test suites
+"../Common.cfg"
+# testsuite specific configuration, not expected to change
+"./MME_Tests.default"
+
+# Local configuration below
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+
+[MODULE_PARAMETERS]
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+MME_Tests.control
diff --git a/mme/MME_Tests.default b/mme/MME_Tests.default
new file mode 100644
index 000..1c220d8
--- /dev/null
+++ b/mme/MME_Tests.default
@@ -0,0 +1,12 @@
+[LOGGING]
+FileMask := LOG_ALL | TTCN_MATCHING;
+mtc.FileMask := ERROR | WARNING | PARALLEL | VERDICTOP;
+
+[TESTPORT_PARAMETERS]
+
+
+[MODULE_PARAMETERS]
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
diff --git a/mme/MME_Tests.ttcn b/mme/MME_Tests.ttcn
index 3ba0677..ae71173 100644
--- a/mme/MME_Tests.ttcn
+++ b/mme/MME_Tests.ttcn
@@ -10,31 +10,84 @@

 module MME_Tests {

+import from General_Types all;
+
+import from S1AP_Types all;
+import from S1AP_Templates all;
+import from S1AP_Emulation all;
+import from S1AP_PDU_Descriptions all;
+import from S1AP_IEs all;
+
+import from NAS_EPS_Types all;
+import from NAS_Templates all;
+
 import from SGsAP_Types all;
 import from SGsAP_Templates all;
 import from SGsAP_Emulation all;

+import from LTE_CryptoFunctions all;
+
 import from L3_Templates all;
 import from DNS_Helpers all;
+import from Osmocom_Types all;

 friend module MME_Tests_SGsAP;

+/* (maximum) number of emulated eNBs */
+const integer NUM_ENB := 3;
+
+/* (maximum) number of emulated UEs */
+const integer NUM_UE := 3;
+
+/* parameters of emulated ENB */
+type record EnbParams {
+   Global_ENB_ID global_enb_id,
+   integer cell_identity,
+   SupportedTAs supported_tas
+}
+
+/* parameters of emulated UE */
+type record UeParams {
+   hexstring imsi
+}
+
 type component MTC_CT {
+   /* S1 intreface of emulated ENBs */
+   var EnbParams g_enb_pars[NUM_ENB];
+   var S1AP_Emulation_CT vc_S1AP[NUM_ENB];
+   port S1AP_PT S1AP_UNIT[NUM_ENB];
+   port S1APEM_PROC_PT S1AP_PROC[NUM_ENB];
+
+   /* SGs interface of emulated MSC/VLR */
var SGsAP_Emulation_CT vc_SGsAP;
port SGsAP_PT SGsAP_UNIT;
port SGsAPEM_PROC_PT SGsAP_PROC;
+
+   var UeParams g_ue_pars[NUM_UE];
 }

-type component ConnHdlr extends SGsAP_ConnHdlr {
+type component ConnHdlr extends S1AP_ConnHdlr, SGsAP_ConnHdlr {
var ConnHdlrPars g_pars;
timer g_Tguard := 30.0;
 }

 type record ConnHdlrPars {
-   hexstring imsi
+   /* copied over from MTC_CT on start of component */
+   EnbParams enb_pars[NUM_ENB],
+   /* copied over from MTC_CT on start of component */
+   UeParams ue_pars,
+   /* currently used MME (index into enb_pars, S1AP, ...) */
+   integer mme_idx
 }

 modulepar {
+   /* S1 interface */
+   charstring mp_mme_ip := "127.0.0.1";
+   integer mp_mme_s1ap_port := 36412;
+   charstring mp_s1_local_ip := "127.0.0.1";
+   integer mp_s1_local_port := 5;
+
+   /* SGs interface */
charstring mp_sgs_local_ip := "127.0.0.1";
integer mp_sgs_local_port := 29118;
charstring mp_vlr_name := "vlr.example.net";
@@ -68,11 +121,96 @@
vc_SGsAP.start(SGsAP_Emulation.main(ops, pars, id));
 }

+/* send incoming unit data messages (like reset) to global S1AP_UNIT port */
+friend function S1apForwardUnitdataCallback(S1AP_PDU msg)
+runs on S1AP_Emulation_CT return template S1AP_PDU {
+   S1AP_UNIT.send(msg);
+   return omit;
+}
+
+friend function S1apCreateCallback(S1AP_PDU msg, template (omit) 
MME_UE_S1AP_ID mme_id,
+  template (omit) ENB_UE_S1AP_ID enb_id, 
charstring id)
+runs on S1AP_Emulation_CT return S1AP_ConnHdlr
+{
+   setverdict(fail, "implement this");
+   mtc.stop;
+}
+
+friend function f_init_one_enb(charstring id, integer num := 0) runs on MTC_CT 
{
+   id := id & "-S1AP" & int2str(num);
+   var S1APOps ops := {
+   create_cb := refers(S1apCreateCallback),
+   unitdata_cb := refers(S1apForwardUnitdataCallback)
+   }
+   var 

Change in ...osmo-ttcn3-hacks[master]: Import snow-3g.[ch] from nextepc source code

2019-08-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15198 )

Change subject: Import snow-3g.[ch] from nextepc source code
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15198
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I938de2ad17210aa1561240c0a96d0df216243be1
Gerrit-Change-Number: 15198
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sun, 18 Aug 2019 17:14:00 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: snow-3g.c: Mark all internal primitive functions as static

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15200 )

Change subject: snow-3g.c: Mark all internal primitive functions as static
..

snow-3g.c: Mark all internal primitive functions as static

We don't need to pollute the public namespace

Change-Id: I55347320383b173d1aca622997e7cfb98cd9caff
---
M mme/snow-3g.c
1 file changed, 13 insertions(+), 13 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/mme/snow-3g.c b/mme/snow-3g.c
index 6d4fe2a..992b107 100644
--- a/mme/snow-3g.c
+++ b/mme/snow-3g.c
@@ -78,7 +78,7 @@
 * See section 3.1.1 for details.
 */

-u8 MULx(u8 V, u8 c)
+static u8 MULx(u8 V, u8 c)
 {
if ( V & 0x80 )
return ( (V << 1) ^ c);
@@ -94,7 +94,7 @@
 * See section 3.1.2 for details.
 */

-u8 MULxPOW(u8 V, u8 i, u8 c)
+static u8 MULxPOW(u8 V, u8 i, u8 c)
 {
if ( i == 0)
return V;
@@ -108,7 +108,7 @@
 * See section 3.4.2 for details.
 */

-u32 MULalpha(u8 c)
+static u32 MULalpha(u8 c)
 {
return ( ( ((u32)MULxPOW(c, 23, 0xa9)) << 24 ) |
( ((u32)MULxPOW(c, 245, 0xa9)) << 16 ) |
@@ -122,7 +122,7 @@
 * See section 3.4.3 for details.
 */

-u32 DIValpha(u8 c)
+static u32 DIValpha(u8 c)
 {
return ( ( ((u32)MULxPOW(c, 16, 0xa9)) << 24 ) |
( ((u32)MULxPOW(c, 39, 0xa9)) << 16 ) |
@@ -136,7 +136,7 @@
 * See section 3.3.1.
 */

-u32 S1(u32 w)
+static u32 S1(u32 w)
 {
u8 r0=0, r1=0, r2=0, r3=0;
u8 srw0 = SR[ (u8)((w >> 24) & 0xff) ];
@@ -174,7 +174,7 @@
 * See section 3.3.2.
 */

-u32 S2(u32 w)
+static u32 S2(u32 w)
 {
u8 r0=0, r1=0, r2=0, r3=0;
u8 sqw0 = SQ[ (u8)((w >> 24) & 0xff) ];
@@ -211,7 +211,7 @@
 * See section 3.4.4.
 */

-void ClockLFSRInitializationMode(u32 F)
+static void ClockLFSRInitializationMode(u32 F)
 {
u32 v = ( ( (LFSR_S0 << 8) & 0xff00 ) ^
( MULalpha( (u8)((LFSR_S0>>24) & 0xff) ) ) ^
@@ -243,7 +243,7 @@
 * See section 3.4.5.
 */

-void ClockLFSRKeyStreamMode()
+static void ClockLFSRKeyStreamMode()
 {
u32 v = ( ( (LFSR_S0 << 8) & 0xff00 ) ^
( MULalpha( (u8)((LFSR_S0>>24) & 0xff) ) ) ^
@@ -275,7 +275,7 @@
 * See Section 3.4.6.
 */

-u32 ClockFSM()
+static u32 ClockFSM()
 {
u32 F = ( ( LFSR_S15 + FSM_R1 ) & 0x ) ^ FSM_R2 ;
u32 r = ( FSM_R2 + ( FSM_R3 ^ LFSR_S5 ) ) & 0x ;
@@ -433,7 +433,7 @@
  * function.
  * See section 4.3.2 for details.
  */
-u64 MUL64x(u64 V, u64 c)
+static u64 MUL64x(u64 V, u64 c)
 {
if ( V & 0x8000 )
return (V << 1) ^ c;
@@ -449,7 +449,7 @@
  * A 64-bit memory is allocated which is to be freed by the calling function.
  * See section 4.3.3 for details.
  */
-u64 MUL64xPOW(u64 V, u8 i, u64 c)
+static u64 MUL64xPOW(u64 V, u8 i, u64 c)
 {
if ( i == 0)
return V;
@@ -466,7 +466,7 @@
  * function.
  * See section 4.3.4 for details.
  */
-u64 MUL64(u64 V, u64 P, u64 c)
+static u64 MUL64(u64 V, u64 P, u64 c)
 {
u64 result = 0;
int i = 0;
@@ -484,7 +484,7 @@
  * Output : an 8 bit mask.
  * Prepares an 8 bit mask with required number of 1 bits on the MSB side.
  */
-u8 mask8bit(int n)
+static u8 mask8bit(int n)
 {
return 0xFF ^ ((1<<(8-n)) - 1);
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15200
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I55347320383b173d1aca622997e7cfb98cd9caff
Gerrit-Change-Number: 15200
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: snow-3g: const-ify S-boxes

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15199 )

Change subject: snow-3g: const-ify S-boxes
..

snow-3g: const-ify S-boxes

Change-Id: I3a85120aad95011954f25bb42900133cb30cddb7
---
M mme/snow-3g.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/mme/snow-3g.c b/mme/snow-3g.c
index 4c728fe..6d4fe2a 100644
--- a/mme/snow-3g.c
+++ b/mme/snow-3g.c
@@ -31,7 +31,7 @@

 /* Rijndael S-box SR */

-static u8 SR[256] = {
+static const u8 SR[256] = {
 
0x63,0x7C,0x77,0x7B,0xF2,0x6B,0x6F,0xC5,0x30,0x01,0x67,0x2B,0xFE,0xD7,0xAB,0x76,
 
0xCA,0x82,0xC9,0x7D,0xFA,0x59,0x47,0xF0,0xAD,0xD4,0xA2,0xAF,0x9C,0xA4,0x72,0xC0,
 
0xB7,0xFD,0x93,0x26,0x36,0x3F,0xF7,0xCC,0x34,0xA5,0xE5,0xF1,0x71,0xD8,0x31,0x15,
@@ -52,7 +52,7 @@

 /* S-box SQ */

-static u8 SQ[256] = {
+static const u8 SQ[256] = {
 
0x25,0x24,0x73,0x67,0xD7,0xAE,0x5C,0x30,0xA4,0xEE,0x6E,0xCB,0x7D,0xB5,0x82,0xDB,
 
0xE4,0x8E,0x48,0x49,0x4F,0x5D,0x6A,0x78,0x70,0x88,0xE8,0x5F,0x5E,0x84,0x65,0xE2,
 
0xD8,0xE9,0xCC,0xED,0x40,0x2F,0x11,0x28,0x57,0xD2,0xAC,0xE3,0x4A,0x15,0x1B,0xB9,

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15199
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3a85120aad95011954f25bb42900133cb30cddb7
Gerrit-Change-Number: 15199
Gerrit-PatchSet: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: library: Add S1AP CodecPort/Emulation

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15196 )

Change subject: library: Add S1AP CodecPort/Emulation
..

library: Add S1AP CodecPort/Emulation

Change-Id: I9bfba3ab2a3830e590b203c44c03b9c9383fff99
---
A library/S1AP_CodecPort.ttcn
A library/S1AP_CodecPort_CtrlFunct.ttcn
A library/S1AP_CodecPort_CtrlFunctDef.cc
A library/S1AP_Emulation.ttcn
M mme/gen_links.sh
M mme/regen_makefile.sh
6 files changed, 871 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/library/S1AP_CodecPort.ttcn b/library/S1AP_CodecPort.ttcn
new file mode 100644
index 000..59cef18
--- /dev/null
+++ b/library/S1AP_CodecPort.ttcn
@@ -0,0 +1,82 @@
+module S1AP_CodecPort {
+
+/* Simple S1AP Codec Port, translating between raw SCTP primitives with
+ * octetstring payload towards the IPL4asp provider, and S1AP primitives
+ * which carry the decoded S1AP data types as payload.
+ *
+ * (C) 2019 by Harald Welte 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+   import from IPL4asp_PortType all;
+   import from IPL4asp_Types all;
+   import from S1AP_PDU_Descriptions all;
+   import from S1AP_Types all;
+
+   type record S1AP_RecvFrom {
+   ConnectionIdconnId,
+   HostNameremName,
+   PortNumber  remPort,
+   HostNamelocName,
+   PortNumber  locPort,
+   S1AP_PDUmsg
+   };
+
+   template S1AP_RecvFrom t_S1AP_RecvFrom(template S1AP_PDU msg) := {
+   connId := ?,
+   remName := ?,
+   remPort := ?,
+   locName := ?,
+   locPort := ?,
+   msg := msg
+   }
+
+   type record S1AP_Send {
+   ConnectionIdconnId,
+   S1AP_PDUmsg
+   }
+
+   template S1AP_Send t_S1AP_Send(template ConnectionId connId, template 
S1AP_PDU msg) := {
+   connId := connId,
+   msg := msg
+   }
+
+   private function IPL4_to_S1AP_RecvFrom(in ASP_RecvFrom pin, out 
S1AP_RecvFrom pout) {
+   pout.connId := pin.connId;
+   pout.remName := pin.remName;
+   pout.remPort := pin.remPort;
+   pout.locName := pin.locName;
+   pout.locPort := pin.locPort;
+   pout.msg := dec_S1AP_PDU(pin.msg);
+   } with { extension "prototype(fast)" };
+
+   private function S1AP_to_IPL4_Send(in S1AP_Send pin, out ASP_Send pout) 
{
+   pout.connId := pin.connId;
+   pout.proto := {
+   sctp := {
+   sinfo_stream := omit,
+   sinfo_ppid := 18,
+   remSocks := omit,
+   assocId := omit
+   }
+   };
+   pout.msg := enc_S1AP_PDU(pin.msg);
+   } with { extension "prototype(fast)" };
+
+   type port S1AP_CODEC_PT message {
+   out S1AP_Send;
+   in  S1AP_RecvFrom,
+   ASP_ConnId_ReadyToRelease,
+   ASP_Event;
+   } with { extension "user IPL4asp_PT
+   out(S1AP_Send -> ASP_Send:function(S1AP_to_IPL4_Send))
+   in(ASP_RecvFrom -> S1AP_RecvFrom: 
function(IPL4_to_S1AP_RecvFrom);
+  ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: 
simple;
+  ASP_Event -> ASP_Event: simple)"
+   }
+}
diff --git a/library/S1AP_CodecPort_CtrlFunct.ttcn 
b/library/S1AP_CodecPort_CtrlFunct.ttcn
new file mode 100644
index 000..0399199
--- /dev/null
+++ b/library/S1AP_CodecPort_CtrlFunct.ttcn
@@ -0,0 +1,44 @@
+module S1AP_CodecPort_CtrlFunct {
+
+  import from S1AP_CodecPort all;
+  import from IPL4asp_Types all;
+
+  external function f_IPL4_listen(
+inout S1AP_CODEC_PT portRef,
+in HostName locName,
+in PortNumber locPort,
+in ProtoTuple proto,
+in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_connect(
+inout S1AP_CODEC_PT portRef,
+in HostName remName,
+in PortNumber remPort,
+in HostName locName,
+in PortNumber locPort,
+in ConnectionId connId,
+in ProtoTuple proto,
+in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_close(
+inout S1AP_CODEC_PT portRef,
+in ConnectionId id,
+in ProtoTuple proto := { unspecified := {} }
+  ) return Result;
+
+  external function f_IPL4_setUserData(
+inout S1AP_CODEC_PT portRef,
+in ConnectionId id,
+in UserData userData
+  ) return Result;
+
+  

Change in ...osmo-ttcn3-hacks[master]: mme: Add GTPv2 support

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15204 )

Change subject: mme: Add GTPv2 support
..

mme: Add GTPv2 support

this includes a GTPv2_CodecPort (for the usual transcoding)
as wella as an empty GTPv2_PrivateExtensions.ttcn without which
the TITAN GTPv2 ProtocolModule won't compile.

Change-Id: I1c1b8409077103dd4e64e467d21d33d8c9c4ac95
---
A library/GTPv2_CodecPort.ttcn
A library/GTPv2_PrivateExtensions.ttcn
A library/GTPv2_Templates.ttcn
M mme/gen_links.sh
M mme/regen_makefile.sh
5 files changed, 411 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/GTPv2_CodecPort.ttcn b/library/GTPv2_CodecPort.ttcn
new file mode 100644
index 000..1f08f19
--- /dev/null
+++ b/library/GTPv2_CodecPort.ttcn
@@ -0,0 +1,57 @@
+/* dual-faced port sitting on top of IPL4_asp UDP to encode/decode GTPv2C
+ * (C) 2019 Harald Welte 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+
+module GTPv2_CodecPort {
+   import from IPL4asp_PortType all;
+   import from IPL4asp_Types all;
+   import from GTPv2C_Types all;
+
+   /* identifies a remote peer (sender or receiver) */
+   type record GtpPeer {
+   ConnectionIdconnId,
+   HostNameremName,
+   PortNumber  remPort
+   }
+
+   /* Decoded GTP2C (Control Plane), used in send and receive direction */
+   type record Gtp2cUnitdata {
+   GtpPeer peer,
+   PDU_GTPCv2  gtpc
+   }
+
+   /* Translation port on top of IPL4asp; ASP_Event passed through 
transparently */
+   type port GTPv2C_PT message {
+   out Gtp2cUnitdata;
+   in  Gtp2cUnitdata,
+   ASP_ConnId_ReadyToRelease,
+   ASP_Event;
+   } with { extension "user IPL4asp_PT
+   out(Gtp2cUnitdata -> ASP_SendTo: function(f_enc_Gtp2cUD))
+   in(ASP_RecvFrom -> Gtp2cUnitdata: function(f_dec_Gtp2cUD);
+  ASP_ConnId_ReadyToRelease -> ASP_ConnId_ReadyToRelease: 
simple;
+  ASP_Event -> ASP_Event: simple)" }
+
+   private function f_enc_Gtp2cUD(in Gtp2cUnitdata in_ud, out ASP_SendTo 
out_ud) {
+   out_ud.connId := in_ud.peer.connId;
+   out_ud.remName := in_ud.peer.remName;
+   out_ud.remPort := in_ud.peer.remPort;
+   out_ud.proto := { udp := {} };
+   out_ud.msg := enc_PDU_GTPCv2(in_ud.gtpc);
+   } with { extension "prototype(fast)" };
+
+   private function f_dec_Gtp2cUD(in ASP_RecvFrom in_ud, out Gtp2cUnitdata 
out_ud) {
+   out_ud.peer.connId := in_ud.connId;
+   out_ud.peer.remName := in_ud.remName;
+   out_ud.peer.remPort := in_ud.remPort;
+   out_ud.gtpc := dec_PDU_GTPCv2(in_ud.msg);
+   } with { extension "prototype(fast)" };
+
+}
diff --git a/library/GTPv2_PrivateExtensions.ttcn 
b/library/GTPv2_PrivateExtensions.ttcn
new file mode 100644
index 000..63552f2
--- /dev/null
+++ b/library/GTPv2_PrivateExtensions.ttcn
@@ -0,0 +1,21 @@
+module GTPv2_PrivateExtensions {
+
+/* This is a small stub module to make GTPv2_Types.ttcn from
+ * titan.ProtocolModules.GTPv2_v13.7.0 compile */
+
+import from General_Types all;
+
+type record PrivateExtension {
+   OCT1elementIdentifier,
+   LIN2_BO_LASTlengthIndicator,
+   BIT4instance,
+   BIT4spare,
+   octetstring data
+} with {
+   variant (lengthIndicator) "LENGTHTO(data)";
+   variant "PRESENCE (elementIdentifier = 'FE'O; )"
+}
+
+type record of PrivateExtension PrivateExtension_List;
+
+} with{ encode "RAW" }
diff --git a/library/GTPv2_Templates.ttcn b/library/GTPv2_Templates.ttcn
new file mode 100644
index 000..23b0053
--- /dev/null
+++ b/library/GTPv2_Templates.ttcn
@@ -0,0 +1,323 @@
+module GTPv2_Templates {
+
+/* (C) 2019 by Harald Welte 
+ * All rights reserved.
+ *
+ * Released under the terms of GNU General Public License, Version 2 or
+ * (at your option) any later version.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+import from General_Types all;
+import from Osmocom_Types all;
+import from GTPv2_Types all;
+
+private function fs_GTP2C_t_bit(template (omit) OCT4 teid) return BIT1 {
+   if (istemplatekind(teid, "omit")) {
+   return '0'B;
+   } else {
+   return '1'B;
+   }
+}
+
+private function fs_GTP2C_p_bit(template (omit) PDU_GTPCv2 piggyback) return 
BIT1 {
+   if (istemplatekind(piggyback, "omit")) {
+   return '0'B;
+   } else {
+   return '1'B;
+   }
+}
+
+template 

Change in ...osmo-ttcn3-hacks[master]: mme: Add GTPv2 support

2019-08-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15204 )

Change subject: mme: Add GTPv2 support
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15204
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1c1b8409077103dd4e64e467d21d33d8c9c4ac95
Gerrit-Change-Number: 15204
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Sun, 18 Aug 2019 17:14:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: BSC_Tests: Change test-expectation of TC_paging_resp_unsol

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15208 )

Change subject: BSC_Tests: Change test-expectation of TC_paging_resp_unsol
..

BSC_Tests: Change test-expectation of TC_paging_resp_unsol

The testcase TC_paging_resp_unsol expects the BSC to close the channel
when an unsolicit paging response is received. This expectation is due
to the fact that osmo-bsc supports multiple MSC, which is not specified
in 3gpp specs. Therefore the BSC needs to know which MSC is in charge.

However, with MT-CSFB calls it is a normal situation that the BSC
receives a paging response on abis without sending a paging first since
the MSC has paged the UE via the SGs interface. In those cases we expect
the BSC to forward the paging response to the first configured MSC.

Related: SYS#4624
Change-Id: I5562cbf61a2aa42e6950860bc0f9c6c20c61a9fe
---
M bsc/BSC_Tests.ttcn
1 file changed, 23 insertions(+), 6 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  neels: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 09c5e5c..327326d 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -1604,17 +1604,22 @@
f_shutdown_helper();
 }

-/* Verify how we handle unsolicited Paging Response, for instance because we
- * receive a Paging Response after T3113 expired (and subscriber information 
was
- * dropped). See OS#3680.
+/* Verify how we handle unsolicited Paging Response. In case of an unsolicit
+ * paging response we can not know which MSC is in charge, so we will blindly
+ * pick the first configured MSC. This behavior is required in order to make
+ * MT-CSFB calls working because in those cases the BSC can not know that the
+ * MSC has already paged the subscriver via SGs. So any MT-CSFB call will look
+ * like an unsolicited Paging Response to the MSC.
  */
 testcase TC_paging_resp_unsol() runs on test_CT {

f_init(1);
+   timer T := 5.0;

var BSSAP_N_CONNECT_ind rx_c_ind;
var DchanTuple dt;
var PDU_ML3_MS_NW l3 := 
valueof(ts_PAG_RESP(valueof(ts_MI_IMSI_LV('001010008880018'H;
+   var octetstring rr_pag_resp := enc_PDU_ML3_MS_NW(l3);
 
/* Send CHAN RQD and wait for allocation; acknowledge it */
dt.rsl_chan_nr := f_chreq_act_ack();
@@ -1622,10 +1627,22 @@
/* Send unsolicited Paging response (no matching Paging CMD stored in 
BSC) */
f_ipa_tx(0, ts_RSL_EST_IND(dt.rsl_chan_nr, 
valueof(ts_RslLinkID_DCCH(0)), enc_PDU_ML3_MS_NW(l3)));

-   /* expect BSC to disable the channel */
-   f_expect_chan_rel(0, dt.rsl_chan_nr, expect_rll_rel_req := false);
-   setverdict(pass);

+   /* Expevct a CR with a matching Paging response on the A-Interface */
+   T.start;
+   alt {
+   [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, 
tr_BSSMAP_ComplL3(rr_pag_resp))) {
+   setverdict(pass);
+   }
+   [] BSSAP.receive {
+   setverdict(fail, "Received unexpected message on A-Interface!");
+   }
+   [] T.timeout {
+   setverdict(fail, "Received nothing on A-Interface!");
+   }
+   }
+
+   setverdict(pass);
 }

 /* Test RSL link drop causes counter increment */

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15208
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5562cbf61a2aa42e6950860bc0f9c6c20c61a9fe
Gerrit-Change-Number: 15208
Gerrit-PatchSet: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-CC: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: RAN_Adapter: invert check for RAN_ops == omit

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15157 )

Change subject: RAN_Adapter: invert check for RAN_ops == omit
..

RAN_Adapter: invert check for RAN_ops == omit

The SGSN_Tests.ttcn run into bugs when doing the isvalue() check on a const 
object.
Check explicit for "omit" to skip creation of the vc_RAN object

Change-Id: I639ab6d0586174c0f20b93a53169f0aa254970fa
---
M library/RAN_Adapter.ttcnpp
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/library/RAN_Adapter.ttcnpp b/library/RAN_Adapter.ttcnpp
index e995e8d..8e19241 100644
--- a/library/RAN_Adapter.ttcnpp
+++ b/library/RAN_Adapter.ttcnpp
@@ -90,7 +90,7 @@

/* create components */
ba.vc_SCCP := SCCP_CT.create(id & "-SCCP");
-   if (isvalue(ops)) {
+   if (not istemplatekind(ops, "omit")) {
ba.vc_RAN := RAN_Emulation_CT.create(id & "-RAN");
}
select (cfg.transport) {
@@ -142,7 +142,7 @@
}
}

-   if (isvalue(ops)) {
+   if (not istemplatekind(ops, "omit")) {
timer T := 5.0;
T.start;
//T.timeout;

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15157
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I639ab6d0586174c0f20b93a53169f0aa254970fa
Gerrit-Change-Number: 15157
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: sgsn: Integrate RANAP

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/13754 )

Change subject: sgsn: Integrate RANAP
..

sgsn: Integrate RANAP

Integrate RANAP support to SGSN_Tests.ttcn.

Related: OS#2857
Change-Id: Ib62fc4c6007f6f4c47db7ca096a8d629bc72bb22
---
M sgsn/SGSN_Tests.ttcn
M sgsn/gen_links.sh
M sgsn/regen_makefile.sh
3 files changed, 106 insertions(+), 5 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index e349719..a7cc57f 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -19,6 +19,7 @@
 import from BSSGP_Types all;
 import from BSSGP_Emulation all;
 import from Osmocom_Gb_Types all;
+import from SCCPasp_Types all;

 import from MobileL3_CommonIE_Types all;
 import from MobileL3_GMM_SM_Types all;
@@ -30,6 +31,12 @@
 import from GSUP_Types all;
 import from IPA_Emulation all;

+import from RAN_Adapter all;
+import from RAN_Emulation all;
+import from RANAP_Templates all;
+import from RANAP_PDU_Descriptions all;
+import from RANAP_IEs all;
+
 import from GTP_Emulation all;
 import from GTP_Templates all;
 import from GTP_CodecPort all;
@@ -87,6 +94,20 @@
handle_sns := false
}
};
+
+   RAN_Configurations mp_ranap_cfg := {
+   {
+   transport := RANAP_TRANSPORT_IuCS,
+   sccp_service_type := "mtp3_itu",
+   sctp_addr := { 23908, "127.0.0.1", 2905, "127.0.0.1" },
+   own_pc := 195,
+   own_ssn := 142,
+   peer_pc := 188, /* 0.23.4 */
+   peer_ssn := 142,
+   sio := '83'O,
+   rctx := 2
+   }
+   }
 };

 type record GbInstance {
@@ -100,8 +121,12 @@
 type record length(NUM_GB) of NSConfiguration NSConfigurations;
 type record length(NUM_GB) of BssgpCellId BssgpCellIds;

+const integer NUM_RNC := 1;
+type record of RAN_Configuration RAN_Configurations;
+
 type component test_CT {
var GbInstances g_gb;
+   var RAN_Adapter g_ranap[NUM_RNC];

var GSUP_Emulation_CT vc_GSUP;
var IPA_Emulation_CT vc_GSUP_IPA;
@@ -116,7 +141,7 @@
var boolean g_use_echo := false;
 };
 
-type component BSSGP_ConnHdlr extends BSSGP_Client_CT, GSUP_ConnHdlr, 
GTP_ConnHdlr {
+type component BSSGP_ConnHdlr extends BSSGP_Client_CT, GSUP_ConnHdlr, 
GTP_ConnHdlr, RAN_ConnHdlr {
var BSSGP_ConnHdlrPars g_pars;
timer g_Tguard;
var LLC_Entities llc;
@@ -145,7 +170,10 @@
BssgpCellIds bssgp_cell_id,
AuthVector vec optional,
SGSN_ConnHdlrNetworkPars net,
-   float t_guard
+   float t_guard,
+   /* only in IuPS / RANAP case */
+   SCCP_PAR_Address sccp_addr_local,
+   SCCP_PAR_Address sccp_addr_peer
 };

 private function f_cellid_to_RAI(in BssgpCellId cell_id) return 
RoutingAreaIdentificationV {
@@ -240,6 +268,8 @@

 /* mcc_mnc is 24.008 10.5.5.15 encoded. 262 42 */
 function f_init(BcdMccMnc mcc_mnc := '262F42'H) runs on test_CT {
+   var integer i;
+
if (g_initialized == true) {
return;
}
@@ -288,11 +318,44 @@
f_init_gb(g_gb[0], "SGSN_Test-Gb0", 0);
f_init_gb(g_gb[1], "SGSN_Test-Gb1", 1);
f_init_gb(g_gb[2], "SGSN_Test-Gb2", 2);
+
+   for (i := 0; i < NUM_RNC; i := i+1) {
+   f_ran_adapter_init(g_ranap[i], mp_ranap_cfg[i], "SGSN_Test_" & 
int2str(i), RNC_RanOps);
+   f_ran_adapter_start(g_ranap[i]);
+   }
f_init_gsup("SGSN_Test");
f_init_gtp("SGSN_Test");
f_vty_enable_echo_interval(g_use_echo);
 }

+private function RncUnitdataCallback(RANAP_PDU ranap)
+runs on RAN_Emulation_CT return template RANAP_PDU {
+   var template RANAP_PDU resp := omit;
+
+   log ("RANAP_RncUnitDataCallback");
+   /* answer all RESET with RESET ACK */
+   if (match(ranap, tr_RANAP_Reset)) {
+   log("RANAP_RncUnitdataCallback: Responding to RESET with 
RESET-ACK");
+   var CN_DomainIndicator dom;
+   dom := 
ranap.initiatingMessage.value_.Reset.protocolIEs[1].value_.cN_DomainIndicator;
+   resp := ts_RANAP_ResetAck(dom);
+   }
+   return resp;
+}
+
+const RanOps RNC_RanOps := {
+   ranap_create_cb := refers(RAN_Emulation.RanapExpectedCreateCallback),
+   ranap_unitdata_cb := refers(RncUnitdataCallback),
+   ps_domain := true,
+   decode_dtap := true,
+   role_ms := true,
+   protocol := RAN_PROTOCOL_RANAP,
+   transport := RANAP_TRANSPORT_IuCS,
+   use_osmux := false,
+   sccp_addr_local := omit,
+   sccp_addr_peer := omit
+};
+
 type function void_fn(charstring id) runs on BSSGP_ConnHdlr;

 /* helper function 

Change in ...osmo-ttcn3-hacks[master]: RAN_Adapter: protect RAN_EMULATION_CTRL with ifdef

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15156 )

Change subject: RAN_Adapter: protect RAN_EMULATION_CTRL with ifdef
..

RAN_Adapter: protect RAN_EMULATION_CTRL with ifdef

Change-Id: I1ff98c933b00a90f54ceedf290121d61d35c6063
---
M library/RAN_Adapter.ttcnpp
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/library/RAN_Adapter.ttcnpp b/library/RAN_Adapter.ttcnpp
index 40cf0fa..e995e8d 100644
--- a/library/RAN_Adapter.ttcnpp
+++ b/library/RAN_Adapter.ttcnpp
@@ -168,10 +168,12 @@
connect(ba.vc_IPA:IPA_MGCP_PORT, ba.vc_RAN:MGCP);
 #endif
 #ifdef IPA_EMULATION_CTRL
+#ifdef RAN_EMULATION_CTRL
/* connect IPA CTRL port with BSSMAP CTRL port */
log("Connecting CTRL RAN Emulation to IPA CTRL PORT");
connect(ba.vc_IPA:IPA_CTRL_PORT, ba.vc_RAN:CTRL);
 #endif
+#endif
}
log("Starting RAN_Emulation");
ba.vc_RAN.start(RAN_Emulation.main(valueof(ops), ""));

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15156
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1ff98c933b00a90f54ceedf290121d61d35c6063
Gerrit-Change-Number: 15156
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: RAN_Emulation: Support for PS domain

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/13854 )

Change subject: RAN_Emulation: Support for PS domain
..

RAN_Emulation: Support for PS domain

So far, the RAN_Emulation only supported the CS domain, and not PS. Let's
change that so we can start having IuPS related tests.

Change-Id: I7ba4662e5a7ba31a2582b0c133b3140c8057678f
---
M library/RAN_Emulation.ttcnpp
1 file changed, 92 insertions(+), 14 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index 207adcd..891de09 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -101,6 +101,17 @@
PDU_ML3_NW_MS   dtap
 }

+type record PDU_DTAP_PS_MO {
+   OCT1dlci optional,
+   boolean skip_seq_patching optional,
+   PDU_L3_MS_SGSN  dtap
+}
+
+type record PDU_DTAP_PS_MT {
+   OCT1dlci optional,
+   PDU_L3_SGSN_MS  dtap
+}
+
 template PDU_DTAP_MT ts_PDU_DTAP_MT(template PDU_ML3_NW_MS dtap, template OCT1 
dlci := omit) := {
dlci := dlci,
dtap := dtap
@@ -123,6 +134,29 @@
dtap := dtap
 }

+template (value) PDU_DTAP_PS_MT ts_PDU_DTAP_PS_MT(template (value) 
PDU_L3_SGSN_MS dtap, template (omit) OCT1 dlci := omit) := {
+   dlci := dlci,
+   dtap := dtap
+}
+
+template (value) PDU_DTAP_PS_MO ts_PDU_DTAP_PS_MO(template (value) 
PDU_L3_MS_SGSN dtap, template (value) OCT1 dlci := '00'O,
+ boolean skip_seq_patching := 
false) := {
+   dlci := dlci,
+   skip_seq_patching := skip_seq_patching,
+   dtap := dtap
+}
+
+template PDU_DTAP_PS_MT tr_PDU_DTAP_PS_MT(template PDU_L3_SGSN_MS dtap, 
template OCT1 dlci := *) := {
+   dlci := dlci,
+   dtap := dtap
+}
+
+template PDU_DTAP_PS_MO tr_PDU_DTAP_PS_MO(template PDU_L3_MS_SGSN dtap, 
template OCT1 dlci := *) := {
+   dlci := dlci,
+   skip_seq_patching := ?,
+   dtap := dtap
+}
+
 /* port between individual per-connection components and this dispatcher */
 type port RAN_Conn_PT message {
inout
@@ -142,6 +176,7 @@
 #endif
/* direct DTAP messages from/to clients */
PDU_DTAP_MO, PDU_DTAP_MT,
+   PDU_DTAP_PS_MO, PDU_DTAP_PS_MT,
/* misc indications / requests between SCCP and client */
RAN_Conn_Prim;
 } with { extension "internal" };
@@ -562,24 +597,46 @@
var template (omit) OCT1 dlci := fake_dlci_from_sapi(sapi);
if (g_ran_ops.role_ms) {
/* we are the MS, so any message to us must be MT */
-   var PDU_DTAP_MT mt := {
-   dlci := omit,
-   dtap := dec_PDU_ML3_NW_MS(valueof(l3))
-   };
-   if (isvalue(dlci)) {
-   mt.dlci := valueof(dlci)
+   if (g_ran_ops.ps_domain) {
+   var PDU_DTAP_PS_MT mt := {
+   dlci := omit,
+   dtap := dec_PDU_L3_SGSN_MS(valueof(l3))
+   };
+   if (isvalue(dlci)) {
+   mt.dlci := valueof(dlci);
+   }
+   CLIENT.send(mt) to client;
+   } else {
+   var PDU_DTAP_MT mt := {
+   dlci := omit,
+   dtap := dec_PDU_ML3_NW_MS(valueof(l3))
+   };
+   if (isvalue(dlci)) {
+   mt.dlci := valueof(dlci)
+   }
+   CLIENT.send(mt) to client;
}
-   CLIENT.send(mt) to client;
} else {
/* we are the Network, so any message to us must be MO 
*/
-   var PDU_DTAP_MO mo := {
-   dlci := omit,
-   dtap := dec_PDU_ML3_MS_NW(valueof(l3))
-   };
-   if (isvalue(dlci)) {
-   mo.dlci := valueof(dlci)
+   if (g_ran_ops.ps_domain) {
+   var PDU_DTAP_PS_MO mo := {
+   dlci := omit,
+   dtap := dec_PDU_L3_MS_SGSN(valueof(l3))
+   };
+   if (isvalue(dlci)) {
+   mo.dlci := valueof(dlci);
+   }
+  

Change in ...osmo-ttcn3-hacks[master]: MSC_Tests: do not send an SGsAP-MO-CSFB-INDICATION when testing MT-Call

2019-08-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15220 )

Change subject: MSC_Tests: do not send an SGsAP-MO-CSFB-INDICATION when testing 
MT-Call
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15220
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2e9fda4fe97866c4cbc77224ba1930ca81411fd6
Gerrit-Change-Number: 15220
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sun, 18 Aug 2019 17:13:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/13865 )

Change subject: BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure
..

BSSGP_Emulation: Abandon "BssgpDecoded" intermediate structure

It originally seemed like a great idea to define a custom record
which aggregates the decoded BSSGP, LLC, L3 and/or SNDCP and passes
it to the individual ConnHdlr.  However, particularly with testcase
interoperability for IuPS in mind, this seems bogus.  Also, we
never really took advantage of this.

Let's now decode as far as we can decode any PDU, and then send the
decoded version of that PDU via the ports between the BSSGP_Emulation
and the ConnHdlr component.

Change-Id: I8c1082880902dd9a04935945f0293895f4d0c53a
---
M library/BSSGP_Emulation.ttcn
M pcu/PCU_Tests.ttcn
M pcu/PCU_Tests_RAW.ttcn
M sgsn/SGSN_Tests.ttcn
4 files changed, 112 insertions(+), 165 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index 5b5628e..f8b9f06 100644
--- a/library/BSSGP_Emulation.ttcn
+++ b/library/BSSGP_Emulation.ttcn
@@ -53,7 +53,9 @@
PDU_LLC,
PDU_L3_MS_SGSN,
PDU_L3_SGSN_MS;
-   out BssgpDecoded,
+   out PDU_BSSGP,
+   PDU_LLC,
+   PDU_SN,
NsStatusIndication,
BssgpStatusIndication,
ASP_Event,
@@ -66,7 +68,9 @@
in  ASP_Event,
NsStatusIndication,
BssgpStatusIndication,
-   BssgpDecoded,
+   PDU_BSSGP,
+   PDU_LLC,
+   PDU_SN,
PDU_L3_MS_SGSN,
PDU_L3_SGSN_MS;
out PDU_BSSGP,
@@ -492,6 +496,21 @@
}
 }

+private function f_send_bssgp_dec(BssgpDecoded dec, BSSGP_Client_CT vc_conn, 
BSSGP_SP_PT pt := BSSGP_SP) runs on BSSGP_CT {
+   if (ispresent(dec.l3_mt)) {
+   pt.send(dec.l3_mt) to vc_conn;
+   } else if (ispresent(dec.l3_mo)) {
+   pt.send(dec.l3_mo) to vc_conn;
+   } else if (ispresent(dec.sndcp)) {
+   pt.send(dec.sndcp) to vc_conn;
+   } else if (ispresent(dec.llc)) {
+   pt.send(dec.llc) to vc_conn;
+   } else {
+   pt.send(dec.bssgp) to vc_conn;
+   }
+}
+
+
 altstep as_unblocked() runs on BSSGP_CT {
var BSSGP_Client_CT vc_conn;
var NsUnitdataIndication udi;
@@ -539,7 +558,7 @@
[] BSCP.receive(f_BnsUdInd(tr_BSSGP_PS_PAGING(g_cfg.bvci), g_cfg.bvci)) 
-> value udi {
var hexstring imsi := udi.bssgp.pDU_BSSGP_PAGING_PS.iMSI.digits
vc_conn := f_tbl_comp_by_imsi(imsi);
-   BSSGP_SP.send(f_dec_bssgp(udi.bssgp)) to vc_conn;
+   f_send_bssgp_dec(f_dec_bssgp(udi.bssgp), vc_conn);
}

/* Any other PTP BSSGP message: If it has TLLi, route to component; 
otherwise broadcast */
@@ -548,14 +567,14 @@
var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp);
if (isvalue(tlli)) {
vc_conn := f_tbl_comp_by_tlli(valueof(tlli));
-   BSSGP_SP.send(dec) to vc_conn;
+   f_send_bssgp_dec(dec, vc_conn);
} else {
log("No TLLI: Broadcasting ", dec);
/* broadcast this message to all components */
// TITAN DOESN'T DO THIS, *SIGH*: "BSSGP_SP.send(dec) 
to all component;"
for (var integer i := 0; i < sizeof(ClientTable); i := 
i+1) {
if (isbound(ClientTable[i].comp_ref)) {
-   BSSGP_SP.send(dec) to 
ClientTable[i].comp_ref;
+   f_send_bssgp_dec(dec, 
ClientTable[i].comp_ref);
}
}
}
@@ -567,14 +586,14 @@
var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp);
if (isvalue(tlli)) {
vc_conn := f_tbl_comp_by_tlli(valueof(tlli));
-   BSSGP_SP_SIG.send(dec) to vc_conn;
+   f_send_bssgp_dec(dec, vc_conn, BSSGP_SP_SIG);
} else {
log("No TLLI: Broadcasting ", dec);
/* broadcast this message to all components */
// TITAN DOESN'T DO THIS, *SIGH*: "BSSGP_SP.send(dec) 
to all component;"
for (var integer i := 0; i < sizeof(ClientTable); i := 
i+1) {
if (isbound(ClientTable[i].comp_ref)) {
-   BSSGP_SP_SIG.send(dec) to 
ClientTable[i].comp_ref;
+

Change in ...osmo-ttcn3-hacks[master]: MSC_Tests: do not send an SGsAP-MO-CSFB-INDICATION when testing MT-Call

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15220 )

Change subject: MSC_Tests: do not send an SGsAP-MO-CSFB-INDICATION when testing 
MT-Call
..

MSC_Tests: do not send an SGsAP-MO-CSFB-INDICATION when testing MT-Call

The TTCN3 tests MSC_Tests.TC_bssap_lu_sgsap_lu_and_mt_call and
MSC_Tests.TC_sgsap_lu_and_mt_call initate an MT-CSFB call for testing
purposes, but they also send an SGsAP-MO-CSFB-INDICATION to make the MS
come back to LTE. This is wrong. SGsAP-MO-CSFB-INDICATION just informs
the VLR that the UE has initiated a MO CSFB call on the LTE side. On MT
CSFB calls this message should not appear. Lets remove it.

Related: SYS#4624
Change-Id: I2e9fda4fe97866c4cbc77224ba1930ca81411fd6
---
M msc/MSC_Tests.ttcn
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index c463dd5..7499456 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -4980,9 +4980,6 @@
/* Make sure that subscriber is still present and the SGs association 
is in tact (ref-counting) */
f_ctrl_get_exp(IPA_CTRL, "fsm.SGs-UE.id.imsi:" & hex2str(g_pars.imsi) & 
".state", "SGs-ASSOCIATED");

-   /* Finally simulate the return of the UE to the 4G network */
-   SGsAP.send(ts_SGsAP_MO_CSFB_IND(pars.imsi));
-
/* Test for successful return by triggering a paging, when the paging
 * request is received via SGs, we can be sure that the MSC/VLR has
 * recognized that the UE is now back on 4G */

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15220
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I2e9fda4fe97866c4cbc77224ba1930ca81411fd6
Gerrit-Change-Number: 15220
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-ttcn3-hacks[master]: mme: Add GTPv2 support

2019-08-18 Thread laforge
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15204

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

Change subject: mme: Add GTPv2 support
..

mme: Add GTPv2 support

this includes a GTPv2_CodecPort (for the usual transcoding)
as wella as an empty GTPv2_PrivateExtensions.ttcn without which
the TITAN GTPv2 ProtocolModule won't compile.

Change-Id: I1c1b8409077103dd4e64e467d21d33d8c9c4ac95
---
A library/GTPv2_CodecPort.ttcn
A library/GTPv2_PrivateExtensions.ttcn
A library/GTPv2_Templates.ttcn
M mme/gen_links.sh
M mme/regen_makefile.sh
5 files changed, 411 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/04/15204/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15204
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1c1b8409077103dd4e64e467d21d33d8c9c4ac95
Gerrit-Change-Number: 15204
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-ggsn[master]: libgtp: Remove packets in tx queue belonging pdp being freed

2019-08-18 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/15228 )

Change subject: libgtp: Remove packets in tx queue belonging pdp being freed
..


Patch Set 4: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/15228
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Id86d0b241454d3ad49c64c28087fd2710fa2d17a
Gerrit-Change-Number: 15228
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: keith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sun, 18 Aug 2019 17:07:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-msc[master]: libvlr/vlr.c: cosmetic: move message_type assignment

2019-08-18 Thread fixeria
fixeria has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/15226 )

Change subject: libvlr/vlr.c: cosmetic: move message_type assignment
..

libvlr/vlr.c: cosmetic: move message_type assignment

Change-Id: Ice7f98597b54f03069375fac56fb162f2669e7f0
---
M src/libvlr/vlr.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 625b699..de61ba5 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -680,6 +680,7 @@
 {
struct osmo_gsup_message gsup_msg = {
.message_class = OSMO_GSUP_MESSAGE_CLASS_SUBSCRIBER_MANAGEMENT,
+   .message_type = OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST,
};
uint8_t imei_enc[GSM23003_IMEI_NUM_DIGITS+2]; /* +2: IE header */
int len;
@@ -694,7 +695,6 @@
gsup_msg.imei_enc_len = len;

/* Send CHECK_IMEI_REQUEST */
-   gsup_msg.message_type = OSMO_GSUP_MSGT_CHECK_IMEI_REQUEST;
OSMO_STRLCPY_ARRAY(gsup_msg.imsi, vsub->imsi);
return gsup_client_mux_tx(vsub->vlr->gcm, _msg);
 }
@@ -704,9 +704,9 @@
 {
struct osmo_gsup_message gsup_msg = {
.message_class = OSMO_GSUP_MESSAGE_CLASS_SUBSCRIBER_MANAGEMENT,
+   .message_type = OSMO_GSUP_MSGT_AUTH_FAIL_REPORT,
};

-   gsup_msg.message_type = OSMO_GSUP_MSGT_AUTH_FAIL_REPORT;
OSMO_STRLCPY_ARRAY(gsup_msg.imsi, vsub->imsi);
return gsup_client_mux_tx(vsub->vlr->gcm, _msg);
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15226
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ice7f98597b54f03069375fac56fb162f2669e7f0
Gerrit-Change-Number: 15226
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-msc[master]: libvlr/vlr.c: cosmetic: move message_type assignment

2019-08-18 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/15226 )

Change subject: libvlr/vlr.c: cosmetic: move message_type assignment
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/15226
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ice7f98597b54f03069375fac56fb162f2669e7f0
Gerrit-Change-Number: 15226
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Sun, 18 Aug 2019 11:11:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment