osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-09 Thread Harald Welte

Patch Set 2: Code-Review+2

(1 comment)

https://gerrit.osmocom.org/#/c/5684/2/library/BSSMAP_Templates.ttcn
File library/BSSMAP_Templates.ttcn:

Line 651:   return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & 
mnc[0]);
> The incoming values are defined in BSC_Tests.ttcn as hex strings with the v
I think MNC should be '01'H instead. And then you can use the length of the 
hexstring (in number of nibbles) to know if it's a two-digit or threre-digig 
MNC.  Anyway, this could be a follow-up patch.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-HasComments: Yes


osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Neels Hofmeyr

Patch Set 2: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/#/c/5684/2/library/BSSMAP_Templates.ttcn
File library/BSSMAP_Templates.ttcn:

Line 651:   return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & 
mnc[0]);
looks proper now, except for the case of a two-digit MNC, where mnc[2] would be 
0xf. Not sure if the context already provides for that, the incoming MNC after 
all seems to be some sort of BCD already...


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-HasComments: Yes


osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Stefan Sperling

Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/5684/1/library/BSSMAP_Templates.ttcn
File library/BSSMAP_Templates.ttcn:

Line 651:   return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & 
mnc[0]);
> my doubt is confirmed by http://www.etsi.org/deliver/etsi_ts/148000_148099/
Patchset 2 sets to entire MNC triplet. Paging still works as expected.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-HasComments: Yes


[PATCH] osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Stefan Sperling
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/5684

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

Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC triple octet.

With help from Daniel Willmann.

Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Related: OS#2754
---
M library/BSSMAP_Templates.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index cb6dde8..f452263 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -648,7 +648,7 @@
 }
 
 private function f_enc_mcc_mnc(GsmMcc mcc, GsmMnc mnc) return OCT3 {
-   return hex2oct(mcc[1] & mcc[0] & mnc[0] & mnc[2] & mnc[1]);
+   return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & mnc[0]);
 }
 
 template BSSMAP_FIELD_CellIdentification_CGI ts_BSSMAP_CI_CGI(GsmMcc mcc, 
GsmMnc mnc, GsmLac lac, GsmCellId ci) := {

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 


osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5684/1/library/BSSMAP_Templates.ttcn
File library/BSSMAP_Templates.ttcn:

Line 651:   return hex2oct(mcc[1] & mcc[0] & mcc[2] & mcc[2] & mnc[1] & 
mnc[0]);
> (commented too fast, reading the spec now)
my doubt is confirmed by 
http://www.etsi.org/deliver/etsi_ts/148000_148099/148008/14.02.00_60/ts_148008v140200p.pdf
 chapter 3.2.2.27, which has the coding fixed in the spec


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-HasComments: Yes


osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Neels Hofmeyr

Patch Set 1: Code-Review-1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5684/1/library/BSSMAP_Templates.ttcn
File library/BSSMAP_Templates.ttcn:

Line 651:   return hex2oct(mcc[1] & mcc[0] & mcc[2] & mcc[2] & mnc[1] & 
mnc[0]);
> IIRC there is an 0xf involved ... seems to me we want what gsm48_construct_
(commented too fast, reading the spec now)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-HasComments: Yes


osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5684/1/library/BSSMAP_Templates.ttcn
File library/BSSMAP_Templates.ttcn:

Line 651:   return hex2oct(mcc[1] & mcc[0] & mcc[2] & mcc[2] & mnc[1] & 
mnc[0]);
> mcc[2] twice? ... oh wait, this is ttcn, until I realized I was completely 
IIRC there is an 0xf involved ... seems to me we want what gsm48_construct_ra() 
does? libosmocore/src/gsm/gsm48.c


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-HasComments: Yes


osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Stefan Sperling

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5684/1/library/BSSMAP_Templates.ttcn
File library/BSSMAP_Templates.ttcn:

Line 651:   return hex2oct(mcc[1] & mcc[0] & mcc[2] & mcc[2] & mnc[1] & 
mnc[0]);
> mcc[2] twice? ... oh wait, this is ttcn, until I realized I was completely 
It is correct for LAI, see 
http://www.etsi.org/deliver/etsi_ts/100500_100599/100590/08.15.00_60/ts_100590v081500p.pdf#page=102


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Stefan Sperling 
Gerrit-HasComments: Yes


osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5684/1/library/BSSMAP_Templates.ttcn
File library/BSSMAP_Templates.ttcn:

Line 651:   return hex2oct(mcc[1] & mcc[0] & mcc[2] & mcc[2] & mnc[1] & 
mnc[0]);
mcc[2] twice? ... oh wait, this is ttcn, until I realized I was completely 
confused on what this does. Still mcc[2] twice looks weird to me, sure that is 
correct?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Stefan Sperling

Patch Set 1:

See https://gerrit.osmocom.org/#/c/5684/ instead.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3970382450dd728db68845a6414add8e027706ba
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Stefan Sperling 
Gerrit-HasComments: No


[PATCH] osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Stefan Sperling

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

Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC triple octet.

With help from Daniel Willmann.

Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Related: OS#2754
---
M library/BSSMAP_Templates.ttcn
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/library/BSSMAP_Templates.ttcn b/library/BSSMAP_Templates.ttcn
index cb6dde8..3bd9b35 100644
--- a/library/BSSMAP_Templates.ttcn
+++ b/library/BSSMAP_Templates.ttcn
@@ -648,7 +648,7 @@
 }
 
 private function f_enc_mcc_mnc(GsmMcc mcc, GsmMnc mnc) return OCT3 {
-   return hex2oct(mcc[1] & mcc[0] & mnc[0] & mnc[2] & mnc[1]);
+   return hex2oct(mcc[1] & mcc[0] & mcc[2] & mcc[2] & mnc[1] & mnc[0]);
 }
 
 template BSSMAP_FIELD_CellIdentification_CGI ts_BSSMAP_CI_CGI(GsmMcc mcc, 
GsmMnc mnc, GsmLac lac, GsmCellId ci) := {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99a5317e425d15acd463aa94c683676cacd54e0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 


[ABANDON] osmo-ttcn3-hacks[master]: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC tri...

2018-01-08 Thread Stefan Sperling
Stefan Sperling has abandoned this change.

Change subject: Fix f_enc_mcc_mnc() to return a properly encoded MCC/MNC triple 
octet.
..


Abandoned

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I3970382450dd728db68845a6414add8e027706ba
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Stefan Sperling 
Gerrit-Reviewer: Jenkins Builder