[PATCH] osmo-msc[master]: fix vty write: add missing 'authentication optional/required...

2017-12-13 Thread Neels Hofmeyr

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

fix vty write: add missing 'authentication optional/required' output

Change-Id: I4918b8a8a6f4cbe783f588ebe68a2cf1e7e50ae2
---
M src/libmsc/msc_vty.c
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index d070b4d..14ad19e 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -151,6 +151,8 @@
vty_out(vty, " location updating reject cause %u%s",
gsmnet->reject_cause, VTY_NEWLINE);
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
+   vty_out(vty, " authentication %s%s",
+   gsmnet->authentication_required ? "required" : "optional", 
VTY_NEWLINE);
vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode),
VTY_NEWLINE);
vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4918b8a8a6f4cbe783f588ebe68a2cf1e7e50ae2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Add more tests about invalid channel activations

2017-12-13 Thread Harald Welte

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

BSC_Tests: Add more tests about invalid channel activations

Change-Id: I8a44b5eab6c6e09330305547d145820983f90140
---
M bsc/BSC_Tests.ttcn
1 file changed, 107 insertions(+), 0 deletions(-)


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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 14ba97d..c8016d7 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -538,6 +538,108 @@
setverdict(pass);
 }
 
+/* Test behavior if RSL EST IND for non-active channel */
+testcase TC_rll_est_ind_inact_lchan() runs on test_CT {
+   timer T := 2.0;
+
+   f_init();
+   f_bssap_reset();
+
+   var octetstring l3 := '00010203040506'O;
+   var RslChannelNr chan_nr := valueof(t_RslChanNr_Bm(6));
+   f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3));
+
+   T.start;
+   alt {
+   [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) {
+   setverdict(fail, "MSC received COMPL L3 for non-active lchan");
+   }
+   [] BSSAP.receive {}
+   [] IPA_RSL[0].receive {}
+   [] T.timeout {}
+   }
+
+   setverdict(pass);
+}
+
+/* Test behavior if RSL EST IND for invalid SAPI */
+testcase TC_rll_est_ind_inval_sapi1() runs on test_CT {
+   var RslChannelNr chan_nr;
+
+   f_init();
+   f_bssap_reset();
+
+   chan_nr := f_chreq_act_ack()
+
+   var octetstring l3 := '00010203040506'O;
+   f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(1)), l3));
+
+   timer T := 2.0;
+   T.start;
+   alt {
+   [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) {
+   setverdict(fail, "MSC received COMPL L3 for invalid SAPI 1");
+   }
+   [] BSSAP.receive { repeat; }
+   [] IPA_RSL[0].receive { repeat; }
+   [] T.timeout {}
+   }
+
+   setverdict(pass);
+}
+
+/* Test behavior if RSL EST IND for invalid SAPI */
+testcase TC_rll_est_ind_inval_sapi3() runs on test_CT {
+   timer T := 2.0;
+
+   f_init();
+   f_bssap_reset();
+
+   var RslChannelNr chan_nr := f_chreq_act_ack();
+
+   var octetstring l3 := '00010203040506'O;
+   f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(3)), l3));
+
+   T.start;
+   alt {
+   [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) {
+   setverdict(fail, "MSC received COMPL L3 for invalid SAPI 3");
+   }
+   [] BSSAP.receive { repeat; }
+   [] IPA_RSL[0].receive { repeat; }
+   [] T.timeout {}
+   }
+
+   setverdict(pass);
+}
+
+/* Test behavior if RSL EST IND for invalid SACCH */
+testcase TC_rll_est_ind_inval_sacch() runs on test_CT {
+   timer T := 2.0;
+
+   f_init();
+   f_bssap_reset();
+
+   var RslChannelNr chan_nr := f_chreq_act_ack();
+
+   var octetstring l3 := '00010203040506'O;
+   f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_SACCH(0)), 
l3));
+
+   T.start;
+   alt {
+   [] BSSAP.receive(tr_BSSAP_CONNECT_ind(?, ?, tr_BSSMAP_ComplL3(l3))) {
+   setverdict(fail, "MSC received COMPL L3 for invalid Link 
SACCH");
+   }
+   [] BSSAP.receive { repeat; }
+   [] IPA_RSL[0].receive { repeat; }
+   [] T.timeout {}
+   }
+
+   setverdict(pass);
+}
+
+
+
 
 testcase TC_ctrl_msc_connection_status() runs on test_CT {
var charstring ctrl_resp;
@@ -851,6 +953,11 @@
execute( TC_chan_rel_hard_rlsd() );
execute( TC_chan_rel_a_reset() );
 
+   execute( TC_rll_est_ind_inact_lchan() );
+   execute( TC_rll_est_ind_inval_sapi1() );
+   execute( TC_rll_est_ind_inval_sapi3() );
+   execute( TC_rll_est_ind_inval_sacch() );
+
execute( TC_paging_imsi_nochan() );
execute( TC_paging_tmsi_nochan() );
execute( TC_paging_tmsi_any() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a44b5eab6c6e09330305547d145820983f90140
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: Make as_Tguard() more robust (don't abort after R...

2017-12-13 Thread Harald Welte

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

BSC_Tests: Make as_Tguard() more robust (don't abort after RESET)

Change-Id: Ia5a39d372c1b7ec8267446f2762aabc600667775
---
M bsc/BSC_Tests.ttcn
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 2e48e0b..aa8150a 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -163,6 +163,7 @@
[] BSSAP.receive(tr_BSSAP_UNITDATA_ind(?, ?, tr_BSSMAP_Reset)) -> value 
ud_ind {
BSSAP.send(ts_BSSAP_UNITDATA_req(ud_ind.callingAddress, 
ud_ind.calledAddress,
   ts_BSSMAP_ResetAck));
+   repeat;
}
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5a39d372c1b7ec8267446f2762aabc600667775
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK

2017-12-13 Thread Harald Welte

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

BSC_Tests: remove copy+paste CHAN RQD -> CHAN ACT -> CHAN ACK

... and replace it with a function

Change-Id: Id75cc92ddf1c1833c892a7bfa77d6561fd0f3679
---
M bsc/BSC_Tests.ttcn
1 file changed, 15 insertions(+), 20 deletions(-)


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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index aa8150a..14ba97d 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -255,10 +255,7 @@
f_bssap_reset();
 
/* Send CHAN RQD and wait for allocation; acknowledge it */
-   f_ipa_tx(0, ts_RSL_CHAN_RQD('23'O, 23));
-   rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
-   var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr;
-   f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 23));
+   var RslChannelNr chan_nr := f_chreq_act_ack();
 
/* expect BSC to disable the channel again if there's no RLL EST IND */
rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_RF_CHAN_REL), 
T3101_MAX);
@@ -274,10 +271,7 @@
f_bssap_reset();
 
/* Send CHAN RQD and wait for allocation; acknowledge it */
-   f_ipa_tx(0, ts_RSL_CHAN_RQD('23'O, 23));
-   rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
-   var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr;
-   f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 23));
+   var RslChannelNr chan_nr := f_chreq_act_ack();
 
var octetstring l3 := '00010203040506'O
f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3));
@@ -299,10 +293,7 @@
f_bssap_reset();
 
/* Send CHAN RQD and wait for allocation; acknowledge it */
-   f_ipa_tx(0, ts_RSL_CHAN_RQD('23'O, 23));
-   rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
-   var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr;
-   f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, 23));
+   var RslChannelNr chan_nr := f_chreq_act_ack();
 
var octetstring l3 := '00010203040506'O
f_ipa_tx(0, ts_RSL_EST_IND(chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3));
@@ -321,18 +312,25 @@
RslChannelNr rsl_chan_nr
 }
 
+/* Send CHAN RQD and wait for allocation; acknowledge it */
+private function f_chreq_act_ack(OCT1 ra := '23'O, GsmFrameNumber fn := 23)
+runs on test_CT return RslChannelNr {
+   var RSL_Message rx_rsl;
+   f_ipa_tx(0, ts_RSL_CHAN_RQD(ra, fn));
+   rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
+   var RslChannelNr chan_nr := rx_rsl.ies[0].body.chan_nr;
+   f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(chan_nr, fn+10));
+   return chan_nr;
+}
+
 /* helper function to establish a dedicated channel via BTS and MSC */
 function f_est_dchan(OCT1 ra, GsmFrameNumber fn, octetstring l3)
 runs on test_CT return DchanTuple {
var BSSAP_N_CONNECT_ind rx_c_ind;
-   var RSL_Message rx_rsl;
var DchanTuple dt;
 
/* Send CHAN RQD and wait for allocation; acknowledge it */
-   f_ipa_tx(0, ts_RSL_CHAN_RQD(ra, fn));
-   rx_rsl := f_exp_ipa_rx(0, tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV));
-   dt.rsl_chan_nr := rx_rsl.ies[0].body.chan_nr;
-   f_ipa_tx(0, ts_RSL_CHAN_ACT_ACK(dt.rsl_chan_nr, fn+1));
+   dt.rsl_chan_nr := f_chreq_act_ack(ra, fn);
 
f_ipa_tx(0, ts_RSL_EST_IND(dt.rsl_chan_nr, 
valueof(ts_RslLinkID_DCCH(0)), l3));
 
@@ -409,7 +407,6 @@
 /* Test behavior of channel release after hard Clear Command from MSC */
 testcase TC_chan_rel_hard_clear() runs on test_CT {
var BSSAP_N_DATA_ind rx_di;
-   var RSL_Message rx_rsl;
var DchanTuple dt;
var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0));
 
@@ -456,7 +453,6 @@
 
 /* Test behavior of channel release after hard RLSD from MSC */
 testcase TC_chan_rel_hard_rlsd() runs on test_CT {
-   var RSL_Message rx_rsl;
var DchanTuple dt;
var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0));
 
@@ -496,7 +492,6 @@
 
 /* Test behavior of channel release after BSSMAP RESET from MSC */
 testcase TC_chan_rel_a_reset() runs on test_CT {
-   var RSL_Message rx_rsl;
var DchanTuple dt;
var RslLinkId main_dcch := valueof(ts_RslLinkID_DCCH(0));
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id75cc92ddf1c1833c892a7bfa77d6561fd0f3679
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[MERGED] osmo-bsc[master]: cosmetic: osmo_bsc_mgcp: improve comments

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: cosmetic: osmo_bsc_mgcp: improve comments
..


cosmetic: osmo_bsc_mgcp: improve comments

Make the comments for struct mgcp_ctx more expressive

Change-Id: Ie80b4915055e3f944ff1870c38e3609197ab72b2
---
M include/osmocom/bsc/osmo_bsc_mgcp.h
1 file changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h 
b/include/osmocom/bsc/osmo_bsc_mgcp.h
index df18524..e4b038c 100644
--- a/include/osmocom/bsc/osmo_bsc_mgcp.h
+++ b/include/osmocom/bsc/osmo_bsc_mgcp.h
@@ -22,12 +22,17 @@
 
 #include 
 
-/* MGCP state handler context (fsm etc..) */
+/* MGCP state handler context. This context information stores all information
+ * to handle the direction of the RTP streams via MGCP. There is one instance
+ * of this context struct per subscriber connection.
+ * (see also struct osmo_bsc_sccp_con) */
 struct mgcp_ctx {
/* FSM instance, which handles the connection switching procedure */
struct osmo_fsm_inst *fsm;
 
-   /* RTP endpoint number */
+   /* RTP endpoint number. This number number identifies the endpoint
+* on the MGW on which the BTS and NET connection is created. This
+* endpoint number is assigned and released automatically. */
uint16_t rtp_endpoint;
 
/* RTP connection identifiers */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie80b4915055e3f944ff1870c38e3609197ab72b2
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bts[master]: osmo-bts-trx: add error concealment unit for GSM-FR

2017-12-13 Thread Harald Welte

Patch Set 3:

> @dexter, just let me know if I can help you with that.

if you have time and want to split it to a library function and propose an 
API+patch, feel free to go ahead.  dexter has many other things on his hand, so 
I'm not sure when he can get back to it.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iae9e69a9578ae305bca42f834694af96a29084e6
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Reviewer: dexter 
Gerrit-HasComments: No


osmo-bsc[master]: abisip-find: add getopts and option to prevent endless loop

2017-12-13 Thread Harald Welte

Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/5239/2/src/ipaccess/abisip-find.c
File src/ipaccess/abisip-find.c:

Line 210:   strncpy(program_name, basename(argv[0]), sizeof(program_name));
you don't need  to copy the string here, as the argc array is pushed on the 
stack before main() is called. This means it is valid until you return from 
main, and hence a "char *program_name = basename(argv[0]) is sufficient.  
basename *modifies* argv[0] and doesn't create any copies itself.

Also, *if* you want to do a string-copy, please *always* use osmo_strlcpy() 
everywhere to make sure we properly NUL-terminate the buffer in all situations, 
thanks.

Also, *if* you want to use a static-sized buffer, it's best to use PATH_MAX 
rather than the magic number 255, as PATH_MAX is as long as the maximum name of 
a file system path.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I819b9616282dd6efd36c9557c7d6a50b6b00cdc2
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: Yes


[MERGED] osmo-ttcn3-hacks[master]: Ignore build byproducts

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Ignore build byproducts
..


Ignore build byproducts

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

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



diff --git a/.gitignore b/.gitignore
index ccb08fa..d525ada 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
 bin/*.hh
 *.o
 *.log
+*.so
+compile

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

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


osmo-ttcn3-hacks[master]: Ignore build byproducts

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-bsc[master]: mgcp: cancel transactions on timeout

2017-12-13 Thread Harald Welte

Patch Set 1:

waiting for answers to Neels' question before moving this ahead

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I40794dff7d10e2b6a96863a2da7e9fbd5662a1bf
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-bsc[master]: cosmetic: osmo_bsc_mgcp: improve comments

2017-12-13 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: paging: paging_flush_bts: be sure pending_requests is inital...

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-bsc[master]: paging: paging_flush_bts: be sure pending_requests is inital...

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: paging: paging_flush_bts: be sure pending_requests is initalized
..


paging: paging_flush_bts: be sure pending_requests is initalized

The BSSMAP reset causes the paging requests to be flushed. When
this happens right after startup then calling paging_flush_bts()
may be called when the list bts->paging.pending_requests is not
yet initalized, which causes a segfault.

Call paging_init_if_needed() to be sure that the list is
inizalized (like the other functions also do)

Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc
---
M src/libbsc/paging.c
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index d657bd3..42ecdcf 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -477,6 +477,8 @@
 {
struct gsm_paging_request *req, *req2;
 
+   paging_init_if_needed(bts);
+
llist_for_each_entry_safe(req, req2, >paging.pending_requests, 
entry) {
if (msc && req->msc != msc)
continue;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bsc[master]: mgcp: validate rtp connection data in MGW response (ip/port)

2017-12-13 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: fix segfault upon release paging on BSSMAP Reset: init llist

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmocom-bb[master]: mobile/vty_interface.c: fix 'channel-capability' description

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmocom-bb[master]: mobile/vty_interface.c: fix 'channel-capability' description

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: mobile/vty_interface.c: fix 'channel-capability' description
..


mobile/vty_interface.c: fix 'channel-capability' description

Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842
---
M src/host/layer23/src/mobile/vty_interface.c
1 file changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/src/host/layer23/src/mobile/vty_interface.c 
b/src/host/layer23/src/mobile/vty_interface.c
index 8767985..37093ce 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -2392,9 +2392,12 @@
return CMD_SUCCESS;
 }
 
-DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd, "channel-capability "
-   "(sdcch|sdcch+tchf|sdcch+tchf+tchh)",
-   "Select channel capability\nSDCCH only\nSDCCH + TCH/F\nSDCCH + TCH/H")
+DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd,
+   "channel-capability (sdcch|sdcch+tchf|sdcch+tchf+tchh)",
+   "Select channel capability\n"
+   "SDCCH only\n"
+   "SDCCH + TCH/F\n"
+   "SDCCH + TCH/F + TCH/H")
 {
struct osmocom_ms *ms = vty->index;
struct gsm_settings *set = >settings;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bsc[master]: fix segfault upon release paging on BSSMAP Reset: init llist

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: fix segfault upon release paging on BSSMAP Reset: init llist
..


fix segfault upon release paging on BSSMAP Reset: init llist

Initialize the llist head gsm_bts->paging.pending_requests at the time gsm_bts
is allocated, not only at paging_init_if_needed().

The gsm_bts->paging sub-struct is invalid as long as gsm_bts->paging.bts
doesn't point back to bts. Hence the recently added iteration of
gsm_bts->paging.pending_requests should have checked whether bts is NULL. The
llist_head pending_requests is not initialized unless paging_init_if_needed()
has been called (and paging.bts is hence set). However, this fix is a safer way
to prevent errors like this in general.

The segfault was introduced by d382bf63e2b7e28fe41c5310c26fe584f0356897 /
If3f53d3bb66ad2dc02db823cb813590c6b59c700

Related: OS#2747
Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840
---
M src/libbsc/paging.c
M src/libcommon/gsm_data_shared.c
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index 8d54d0a..d657bd3 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -240,7 +240,11 @@
return;
 
bts->paging.bts = bts;
-   INIT_LLIST_HEAD(>paging.pending_requests);
+
+   /* This should be initialized only once. There is currently no code 
that sets bts->paging.bts
+* back to NULL, so let's just assert this one instead of graceful 
handling. */
+   OSMO_ASSERT(llist_empty(>paging.pending_requests));
+
osmo_timer_setup(>paging.work_timer, paging_worker,
 >paging);
 
diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c
index 2f7e7e3..30ef1ca 100644
--- a/src/libcommon/gsm_data_shared.c
+++ b/src/libcommon/gsm_data_shared.c
@@ -364,7 +364,10 @@
 
bts->rach_b_thresh = -1;
bts->rach_ldavg_slots = -1;
+
bts->paging.free_chans_need = -1;
+   INIT_LLIST_HEAD(>paging.pending_requests);
+
bts->features.data = >_features_data[0];
bts->features.data_len = sizeof(bts->_features_data);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test

2017-12-13 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: gprs: ping.py: Disable ipv6 ctx activate test
..


gprs: ping.py: Disable ipv6 ctx activate test

osmo-ggsn is failing to create tun ipv6 device in Prod main unit.
Afterwards, as the iface is not created, it cannot find its link-local
ip and it doesn't configure the ipv6 pool. Later on, when an ipv4v6 ctx
is requested, it fails because apn doesn't support ipv6 (because the
pool is not created).

Related: OS#2746

Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
---
M suites/gprs/ping.py
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved; Verified



diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py
index 1b6d85c..5d2d847 100755
--- a/suites/gprs/ping.py
+++ b/suites/gprs/ping.py
@@ -52,11 +52,12 @@
 # TODO: send ping to server or open TCP conn with a socket in python
 ms.deactivate_context(ctx_id_v4)
 
+# We disable ipv6 for now as osmo-ggsn is failing to create tun ipv6 device in 
Prod main unit (OS#2746)
 # We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713)
-ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6)
-sleep(5)
+# ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6)
+# sleep(5)
 # TODO: send ping to server or open TCP conn with a socket in python
-ms.deactivate_context(ctx_id_v6)
+# ms.deactivate_context(ctx_id_v6)
 
 # IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation 
failed (36)
 # ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test

2017-12-13 Thread Pau Espin Pedrol

Patch Set 2: Code-Review+2 Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[PATCH] osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test

2017-12-13 Thread Pau Espin Pedrol
Hello Harald Welte,

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

https://gerrit.osmocom.org/5329

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

gprs: ping.py: Disable ipv6 ctx activate test

osmo-ggsn is failing to create tun ipv6 device in Prod main unit.
Afterwards, as the iface is not created, it cannot find its link-local
ip and it doesn't configure the ipv6 pool. Later on, when an ipv4v6 ctx
is requested, it fails because apn doesn't support ipv6 (because the
pool is not created).

Related: OS#2746

Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
---
M suites/gprs/ping.py
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/29/5329/2

diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py
index 1b6d85c..5d2d847 100755
--- a/suites/gprs/ping.py
+++ b/suites/gprs/ping.py
@@ -52,11 +52,12 @@
 # TODO: send ping to server or open TCP conn with a socket in python
 ms.deactivate_context(ctx_id_v4)
 
+# We disable ipv6 for now as osmo-ggsn is failing to create tun ipv6 device in 
Prod main unit (OS#2746)
 # We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713)
-ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6)
-sleep(5)
+# ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6)
+# sleep(5)
 # TODO: send ping to server or open TCP conn with a socket in python
-ms.deactivate_context(ctx_id_v6)
+# ms.deactivate_context(ctx_id_v6)
 
 # IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation 
failed (36)
 # ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46)

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ttcn3-hacks[master]: Avoid gcc version check

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Avoid gcc version check
..


Avoid gcc version check

By default the build fails on Debian due to gcc version check in
/usr/include/titan/cversion.h - instead of asking users to manually
change this file let's add workaround to our makefile fixer which
disables this check automatically.

The corresponding Debian bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816

Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328
---
M regen-makefile.sh
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/regen-makefile.sh b/regen-makefile.sh
index 1814699..f757fa3 100755
--- a/regen-makefile.sh
+++ b/regen-makefile.sh
@@ -8,12 +8,16 @@
 #
 # The regexes below patch the generated Makefile to work on Debian 9 and
 # unstable, so far tested with TITAN 6.1.0, 6.2.0 and 6.3.0
+#
 
 ttcn3_makefilegen -l -f $*
 sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile
 sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile
 #sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile
-sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = 
-D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile
+
+# The -DMAKEDEPEND_RUN is a workaround for Debian packaging issue,
+# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 for details
+sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = 
-D$(PLATFORM) -DMAKEDEPEND_RUN -I$(TTCN3_DIR)\/include 
-I\/usr\/include\/titan/' Makefile
 
 # for TITAN 6.3.0
 sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile

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

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


osmo-ttcn3-hacks[master]: Avoid gcc version check

2017-12-13 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

reason belongs in changelog, IMHO.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-ttcn3-hacks[master]: Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort
..


Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort

Change-Id: Ic0750bdc025cd6f16094843550429d976fb44f4f
---
A library/RTP_Emulation.ttcn
1 file changed, 209 insertions(+), 0 deletions(-)

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



diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
new file mode 100644
index 000..b8b1dbe
--- /dev/null
+++ b/library/RTP_Emulation.ttcn
@@ -0,0 +1,209 @@
+module RTP_Emulation {
+
+/* Functionalities that we want this module to imeplement:
+ *  * act as a RTP source that generates a RTP Stream
+ *  * act asaa RTP sink that consumes a RTP Stream
+ *
+ * for all of the above, we want to be able to 
+ *  * specify the payload type
+ *  * specify the interval / sample rate
+ *  * create drop-outs in the stream
+ *  * detect reordered or lost frames
+ *  * validate if the size of the frames matches epectations
+ *  * play back real audio (at least some tones?)
+ *  * enable/disable generation/verification of RTCP
+ */
+
+import from General_Types all;
+import from Osmocom_Types all;
+import from IPL4asp_Types all;
+import from RTP_Types all;
+import from RTP_CodecPort all;
+import from RTP_CodecPort_CtrlFunct all;
+
+type component RTP_Emulation_CT {
+   /* down-facing ports for RTP and RTCP codec ports on top of IPL4asp */
+   port RTP_CODEC_PT RTP;
+   var integer g_rtp_conn_id := -1;
+   port RTP_CODEC_PT RTCP;
+   var integer g_rtcp_conn_id := -1;
+
+   /* user-facing port for controlling the binding */
+   port RTPEM_CTRL_PT CTRL;
+
+   /* configurable by user, should be fixed */
+   var INT7b g_tx_payload_type := 0;
+   var integer g_tx_samplerate_hz := 8000;
+   var integer g_tx_duration_ms := 20;
+   var BIT32_BO_LAST g_tx_ssrc := hex2bit('DEADBEEF'H);
+
+   var HostName g_remote_host;
+   var PortNumber g_remote_port;
+   var HostName g_local_host;
+   var PortNumber g_local_port;
+
+   /* state variables, change over time */
+   var boolean g_rx_enabled := false;
+   var LIN2_BO_LAST g_tx_next_seq := 0;
+   var uint32_t g_tx_next_ts := 0;
+
+   var INT7b g_rx_payload_type := 0;
+   var LIN2_BO_LAST g_rx_last_seq;
+   var uint32_t g_rx_last_ts;
+}
+
+type enumerated RtpemMode {
+   RTPEM_MODE_NONE,
+   RTPEM_MODE_TXONLY,
+   RTPEM_MODE_RXONLY,
+   RTPEM_MODE_BIDIR
+};
+
+signature RTPEM_bind(in HostName local_host, inout PortNumber local_port);
+signature RTPEM_connect(in HostName remote_host, in PortNumber remote_port);
+signature RTPEM_mode(in RtpemMode mode);
+
+type port RTPEM_CTRL_PT procedure {
+   inout RTPEM_bind, RTPEM_connect, RTPEM_mode;
+} with { extension "internal" };
+
+template PDU_RTP ts_RTP(BIT32_BO_LAST ssrc, INT7b pt, LIN2_BO_LAST seq, 
uint32_t ts,
+   octetstring payload, BIT1 marker := '0'B) := {
+   version := 2,
+   padding_ind := '0'B,
+   extension_ind := '0'B,
+   CSRC_count := 0,
+   marker_bit := marker,
+   payload_type := pt,
+   sequence_number := seq,
+   time_stamp := int2bit(ts, 4),
+   SSRC_id := ssrc,
+   CSRCs := omit,
+   ext_header := omit,
+   data := payload
+}
+
+private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on 
RTP_Emulation_CT {
+   var PDU_RTP rtp := valueof(ts_RTP(g_tx_ssrc, g_tx_payload_type, 
g_tx_next_seq,
+ g_tx_next_ts, payload, marker));
+   RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp}));
+   /* increment sequence + timestamp for next transmit */
+   g_tx_next_seq := g_tx_next_seq + 1;
+   g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz mod (1000 mod 
g_tx_duration_ms));
+}
+
+function f_main() runs on RTP_Emulation_CT
+{
+   var Result res;
+
+   timer T_transmit := 1000.0/int2float(g_tx_duration_ms);
+   var RTP_RecvFrom rx_rtp;
+   var template RTP_RecvFrom tr := {
+   connId := ?,
+   remName := ?,
+   remPort := ?,
+   locName := ?,
+   locPort := ?,
+   msg := ?
+   };
+   var template RTP_RecvFrom tr_rtp := tr;
+   var template RTP_RecvFrom tr_rtcp := tr;
+   tr_rtp.connId := g_rtp_conn_id;
+   tr_rtp.msg := { rtp := ? };
+   tr_rtp.connId := g_rtcp_conn_id;
+   tr_rtcp.msg := { rtcp := ? };
+
+   while (true) {
+   alt {
+   /* control procedures (calls) from the user */
+   [] CTRL.getcall(RTPEM_bind:{?,?}) -> param(g_local_host, 
g_local_port) {
+   if (g_local_port rem 2 == 1) {
+   //CTRL.raise(RTPEM_bind, "Local Port is not an 
even port number!");

[MERGED] osmo-ttcn3-hacks[master]: Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files
..


Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files

Change-Id: Ic5499a0b5f635a93214cbb5e641d2fd8d37f38d6
---
A library/RTP_CodecPort_CtrlFunct.ttcn
A library/RTP_CodecPort_CtrlFunctDef.cc
2 files changed, 100 insertions(+), 0 deletions(-)

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



diff --git a/library/RTP_CodecPort_CtrlFunct.ttcn 
b/library/RTP_CodecPort_CtrlFunct.ttcn
new file mode 100644
index 000..9f6cad2
--- /dev/null
+++ b/library/RTP_CodecPort_CtrlFunct.ttcn
@@ -0,0 +1,44 @@
+module RTP_CodecPort_CtrlFunct {
+
+  import from RTP_CodecPort all;
+  import from IPL4asp_Types all;
+
+  external function f_IPL4_listen(
+inout RTP_CODEC_PT portRef,
+in HostName locName,
+in PortNumber locPort,
+in ProtoTuple proto,
+in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_connect(
+inout RTP_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 RTP_CODEC_PT portRef,
+in ConnectionId id,
+in ProtoTuple proto := { unspecified := {} }
+  ) return Result;
+
+  external function f_IPL4_setUserData(
+inout RTP_CODEC_PT portRef,
+in ConnectionId id,
+in UserData userData
+  ) return Result;
+
+  external function f_IPL4_getUserData(
+inout RTP_CODEC_PT portRef,
+in ConnectionId id,
+out UserData userData
+  ) return Result;
+
+}
+
diff --git a/library/RTP_CodecPort_CtrlFunctDef.cc 
b/library/RTP_CodecPort_CtrlFunctDef.cc
new file mode 100644
index 000..ce8e176
--- /dev/null
+++ b/library/RTP_CodecPort_CtrlFunctDef.cc
@@ -0,0 +1,56 @@
+#include "IPL4asp_PortType.hh"
+#include "RTP_CodecPort.hh"
+#include "IPL4asp_PT.hh"
+
+namespace RTP__CodecPort__CtrlFunct {
+
+  IPL4asp__Types::Result f__IPL4__listen(
+RTP__CodecPort::RTP__CODEC__PT& portRef,
+const IPL4asp__Types::HostName& locName,
+const IPL4asp__Types::PortNumber& locPort,
+const IPL4asp__Types::ProtoTuple& proto,
+const IPL4asp__Types::OptionList& options)
+  {
+return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, 
options);
+  }
+  
+  IPL4asp__Types::Result f__IPL4__connect(
+RTP__CodecPort::RTP__CODEC__PT& portRef,
+const IPL4asp__Types::HostName& remName,
+const IPL4asp__Types::PortNumber& remPort,
+const IPL4asp__Types::HostName& locName,
+const IPL4asp__Types::PortNumber& locPort,
+const IPL4asp__Types::ConnectionId& connId,
+const IPL4asp__Types::ProtoTuple& proto,
+const IPL4asp__Types::OptionList& options)
+  {
+return f__IPL4__PROVIDER__connect(portRef, remName, remPort,
+  locName, locPort, connId, proto, 
options);
+  }
+
+  IPL4asp__Types::Result f__IPL4__close(
+RTP__CodecPort::RTP__CODEC__PT& portRef, 
+const IPL4asp__Types::ConnectionId& connId, 
+const IPL4asp__Types::ProtoTuple& proto)
+  {
+  return f__IPL4__PROVIDER__close(portRef, connId, proto);
+  }
+
+  IPL4asp__Types::Result f__IPL4__setUserData(
+RTP__CodecPort::RTP__CODEC__PT& portRef,
+const IPL4asp__Types::ConnectionId& connId,
+const IPL4asp__Types::UserData& userData)
+  {
+return f__IPL4__PROVIDER__setUserData(portRef, connId, userData);
+  }
+  
+  IPL4asp__Types::Result f__IPL4__getUserData(
+RTP__CodecPort::RTP__CODEC__PT& portRef,
+const IPL4asp__Types::ConnectionId& connId,
+IPL4asp__Types::UserData& userData)
+  {
+return f__IPL4__PROVIDER__getUserData(portRef, connId, userData);
+  }
+  
+}
+

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

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


[MERGED] osmo-ttcn3-hacks[master]: move RTP_CodecPort.ttcn to library

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: move RTP_CodecPort.ttcn to library
..


move RTP_CodecPort.ttcn to library

Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3
---
R library/RTP_CodecPort.ttcn
M mgw/gen_links.sh
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/mgw/RTP_CodecPort.ttcn b/library/RTP_CodecPort.ttcn
similarity index 100%
rename from mgw/RTP_CodecPort.ttcn
rename to library/RTP_CodecPort.ttcn
diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh
index 0b8195e..acdeb40 100755
--- a/mgw/gen_links.sh
+++ b/mgw/gen_links.sh
@@ -37,5 +37,5 @@
 gen_links $DIR $FILES
 
 DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn 
MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn 
MGCP_CodecPort_CtrlFunctDef.cc"
+FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn 
MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn 
MGCP_CodecPort_CtrlFunctDef.cc RTP_CodecPort.ttcn"
 gen_links $DIR $FILES

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

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


[MERGED] osmo-ttcn3-hacks[master]: bsc: Run three virtual BTSs (2 in one lac, 1 in another)

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: bsc: Run three virtual BTSs (2 in one lac, 1 in another)
..


bsc: Run three virtual BTSs (2 in one lac, 1 in another)

This allows us to verify if the BSC pages *only* where it is supposed
to page based on the cell identity list in the 08.08 PAGING.

Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457
---
M bsc/BSC_Tests.ttcn
M bsc/osmo-bsc.cfg
M library/BSSMAP_Templates.ttcn
3 files changed, 248 insertions(+), 25 deletions(-)

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



diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 926e8cc..2e48e0b 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -22,7 +22,7 @@
 
 import from RSL_Tests all;
 
-const integer NUM_BTS := 1;
+const integer NUM_BTS := 3;
 const float T3101_MAX := 12.0;
 
 
@@ -88,7 +88,7 @@
map(clnt.vc_IPA:IPA_PORT, system:IPA_CODEC_PT);
connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]);
 
-   clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", -1, 
clnt.ccm_pars));
+   clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", 
1+i, clnt.ccm_pars));
 
/* wait for IPA RSL link to connect and send ID ACK */
T.start;
@@ -606,10 +606,21 @@
 };
 private const Cell_Identity cid := { '001'H, '001'H, 1, 0 };
 
+type set of integer BtsIdList;
+
+private function f_bts_in_list(integer bts_id, BtsIdList bts_ids) return 
boolean {
+   for (var integer j := 0; j < sizeof(bts_ids); j := j + 1) {
+   if (bts_id == bts_ids[j]) {
+   return true;
+   }
+   }
+   return false;
+}
 
 /* core paging test helper function; used by most paging test cases */
 private function f_pageing_helper(hexstring imsi,
  template BSSMAP_FIELD_CellIdentificationList 
cid_list,
+ BtsIdList bts_ids := { 0 },
  template RSL_ChanNeeded rsl_chneed := omit,
  template OCT4 tmsi := omit) runs on test_CT
 {
@@ -618,12 +629,15 @@
var template octetstring id_enc; /* FIXME */
var RSL_Message rx_rsl;
var integer paging_group := hex2int(imsi[lengthof(imsi)-1]);
+   var integer i;
 
f_init();
f_bssap_reset();
 
/* Clear the queue, it might still contain stuff like BCCH FILLING */
-   IPA_RSL[0].clear;
+   for (i := 0; i < sizeof(bts_ids); i := i + 1) {
+   IPA_RSL[bts_ids[i]].clear;
+   }
 
if (isvalue(rsl_chneed)) {
/* The values of 08.08 3.2.2.36 and 08.58 9.3.40 are luckily 
identical */
@@ -643,95 +657,116 @@
id_enc := enc_MobileIdentity(mi);
 */
id_enc := ?;
-   rx_rsl := f_exp_ipa_rx(0, tr_RSL_PAGING_CMD(id_enc));
-   /* check channel type, paging group */
-   if (rx_rsl.ies[1].body.paging_group != paging_group) {
-   setverdict(fail, "Paging for wrong paging group");
+   for (i := 0; i < sizeof(bts_ids); i := i + 1) {
+   rx_rsl := f_exp_ipa_rx(bts_ids[i], tr_RSL_PAGING_CMD(id_enc));
+   /* check channel type, paging group */
+   if (rx_rsl.ies[1].body.paging_group != paging_group) {
+   setverdict(fail, "Paging for wrong paging group");
+   }
+   if (ispresent(rsl_chneed) and
+   rx_rsl.ies[3].body.chan_needed.chan_needed != 
valueof(rsl_chneed)) {
+   setverdict(fail, "RSL Channel Needed != BSSMAP Channel 
Needed");
+   }
}
-   if (ispresent(rsl_chneed) and
-   rx_rsl.ies[3].body.chan_needed.chan_needed != valueof(rsl_chneed)) {
-   setverdict(fail, "RSL Channel Needed != BSSMAP Channel Needed");
+   /* do a quick check on all not-included BTSs if they received paging */
+   for (i := 0; i < NUM_BTS; i := i + 1) {
+   timer T := 0.1;
+   if (f_bts_in_list(i, bts_ids)) {
+   continue;
+   }
+   T.start;
+   alt {
+   [] IPA_RSL[i].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, 
tr_RSL_PAGING_CMD(id_enc))) {
+   setverdict(fail, "Paging on BTS ", i, " which is not 
part of ", bts_ids);
+   }
+   [] IPA_RSL[i].receive { repeat; }
+   [] T.timeout { }
+   }
}
 
setverdict(pass);
 }
 
+const BtsIdList c_BtsId_all := { 0, 1, 2 };
+const BtsIdList c_BtsId_LAC1 := { 0, 1 };
+const BtsIdList c_BtsId_LAC2 := { 2 };
+
 /* PAGING by IMSI + TMSI */
 testcase TC_paging_imsi_nochan() runs on test_CT {
var BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := valueof(ts_BSSMAP_CIL_noCell);
-   f_pageing_helper('001010123456789'H, cid_list);
+   

osmo-ttcn3-hacks[master]: bsc: Run three virtual BTSs (2 in one lac, 1 in another)

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-ttcn3-hacks[master]: move RTP_CodecPort.ttcn to library

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-ttcn3-hacks[master]: Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[PATCH] osmo-gsm-tester[master]: gprs: ping.py: Disable ipv6 ctx activate test

2017-12-13 Thread Pau Espin Pedrol

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

gprs: ping.py: Disable ipv6 ctx activate test

Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
---
M suites/gprs/ping.py
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/29/5329/1

diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py
index 1b6d85c..5d2d847 100755
--- a/suites/gprs/ping.py
+++ b/suites/gprs/ping.py
@@ -52,11 +52,12 @@
 # TODO: send ping to server or open TCP conn with a socket in python
 ms.deactivate_context(ctx_id_v4)
 
+# We disable ipv6 for now as osmo-ggsn is failing to create tun ipv6 device in 
Prod main unit (OS#2746)
 # We need to use inet46 since ofono qmi only uses ipv4v6 eua (OS#2713)
-ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6)
-sleep(5)
+# ctx_id_v6 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv6)
+# sleep(5)
 # TODO: send ping to server or open TCP conn with a socket in python
-ms.deactivate_context(ctx_id_v6)
+# ms.deactivate_context(ctx_id_v6)
 
 # IPv46 (dual) not supported in ofono qmi: org.ofono.Error.Failed: Operation 
failed (36)
 # ctx_id_v46 = ms.activate_context(apn='inet46', protocol=ms.CTX_PROT_IPv46)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


osmo-ttcn3-hacks[master]: Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[PATCH] osmo-ttcn3-hacks[master]: bsc: Run three virtual BTSs (2 in one lac, 1 in another)

2017-12-13 Thread Harald Welte

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

bsc: Run three virtual BTSs (2 in one lac, 1 in another)

This allows us to verify if the BSC pages *only* where it is supposed
to page based on the cell identity list in the 08.08 PAGING.

Change-Id: I53ffe44279a7b83e045b3fdb25da64529955d457
---
M bsc/BSC_Tests.ttcn
M bsc/osmo-bsc.cfg
M library/BSSMAP_Templates.ttcn
3 files changed, 248 insertions(+), 25 deletions(-)


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

diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 926e8cc..2e48e0b 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -22,7 +22,7 @@
 
 import from RSL_Tests all;
 
-const integer NUM_BTS := 1;
+const integer NUM_BTS := 3;
 const float T3101_MAX := 12.0;
 
 
@@ -88,7 +88,7 @@
map(clnt.vc_IPA:IPA_PORT, system:IPA_CODEC_PT);
connect(clnt.vc_IPA:IPA_RSL_PORT, self:IPA_RSL[i]);
 
-   clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", -1, 
clnt.ccm_pars));
+   clnt.vc_IPA.start(IPA_Emulation.main_client(bsc_host, bsc_port, "", 
1+i, clnt.ccm_pars));
 
/* wait for IPA RSL link to connect and send ID ACK */
T.start;
@@ -606,10 +606,21 @@
 };
 private const Cell_Identity cid := { '001'H, '001'H, 1, 0 };
 
+type set of integer BtsIdList;
+
+private function f_bts_in_list(integer bts_id, BtsIdList bts_ids) return 
boolean {
+   for (var integer j := 0; j < sizeof(bts_ids); j := j + 1) {
+   if (bts_id == bts_ids[j]) {
+   return true;
+   }
+   }
+   return false;
+}
 
 /* core paging test helper function; used by most paging test cases */
 private function f_pageing_helper(hexstring imsi,
  template BSSMAP_FIELD_CellIdentificationList 
cid_list,
+ BtsIdList bts_ids := { 0 },
  template RSL_ChanNeeded rsl_chneed := omit,
  template OCT4 tmsi := omit) runs on test_CT
 {
@@ -618,12 +629,15 @@
var template octetstring id_enc; /* FIXME */
var RSL_Message rx_rsl;
var integer paging_group := hex2int(imsi[lengthof(imsi)-1]);
+   var integer i;
 
f_init();
f_bssap_reset();
 
/* Clear the queue, it might still contain stuff like BCCH FILLING */
-   IPA_RSL[0].clear;
+   for (i := 0; i < sizeof(bts_ids); i := i + 1) {
+   IPA_RSL[bts_ids[i]].clear;
+   }
 
if (isvalue(rsl_chneed)) {
/* The values of 08.08 3.2.2.36 and 08.58 9.3.40 are luckily 
identical */
@@ -643,95 +657,116 @@
id_enc := enc_MobileIdentity(mi);
 */
id_enc := ?;
-   rx_rsl := f_exp_ipa_rx(0, tr_RSL_PAGING_CMD(id_enc));
-   /* check channel type, paging group */
-   if (rx_rsl.ies[1].body.paging_group != paging_group) {
-   setverdict(fail, "Paging for wrong paging group");
+   for (i := 0; i < sizeof(bts_ids); i := i + 1) {
+   rx_rsl := f_exp_ipa_rx(bts_ids[i], tr_RSL_PAGING_CMD(id_enc));
+   /* check channel type, paging group */
+   if (rx_rsl.ies[1].body.paging_group != paging_group) {
+   setverdict(fail, "Paging for wrong paging group");
+   }
+   if (ispresent(rsl_chneed) and
+   rx_rsl.ies[3].body.chan_needed.chan_needed != 
valueof(rsl_chneed)) {
+   setverdict(fail, "RSL Channel Needed != BSSMAP Channel 
Needed");
+   }
}
-   if (ispresent(rsl_chneed) and
-   rx_rsl.ies[3].body.chan_needed.chan_needed != valueof(rsl_chneed)) {
-   setverdict(fail, "RSL Channel Needed != BSSMAP Channel Needed");
+   /* do a quick check on all not-included BTSs if they received paging */
+   for (i := 0; i < NUM_BTS; i := i + 1) {
+   timer T := 0.1;
+   if (f_bts_in_list(i, bts_ids)) {
+   continue;
+   }
+   T.start;
+   alt {
+   [] IPA_RSL[i].receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, 
tr_RSL_PAGING_CMD(id_enc))) {
+   setverdict(fail, "Paging on BTS ", i, " which is not 
part of ", bts_ids);
+   }
+   [] IPA_RSL[i].receive { repeat; }
+   [] T.timeout { }
+   }
}
 
setverdict(pass);
 }
 
+const BtsIdList c_BtsId_all := { 0, 1, 2 };
+const BtsIdList c_BtsId_LAC1 := { 0, 1 };
+const BtsIdList c_BtsId_LAC2 := { 2 };
+
 /* PAGING by IMSI + TMSI */
 testcase TC_paging_imsi_nochan() runs on test_CT {
var BSSMAP_FIELD_CellIdentificationList cid_list;
cid_list := valueof(ts_BSSMAP_CIL_noCell);
-   f_pageing_helper('001010123456789'H, cid_list);
+   f_pageing_helper('001010123456789'H, cid_list, c_BtsId_all);
 }
 
 /* PAGING by IMSI + TMSI */
 testcase TC_paging_tmsi_nochan() runs on test_CT {
var 

[PATCH] osmo-bsc[master]: fix segfault upon release paging on BSSMAP Reset: init llist

2017-12-13 Thread Neels Hofmeyr

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

fix segfault upon release paging on BSSMAP Reset: init llist

Initialize the llist head gsm_bts->paging.pending_requests at the time gsm_bts
is allocated, not only at paging_init_if_needed().

The gsm_bts->paging sub-struct is invalid as long as gsm_bts->paging.bts
doesn't point back to bts. Hence the recently added iteration of
gsm_bts->paging.pending_requests should have checked whether bts is NULL. The
llist_head pending_requests is not initialized unless paging_init_if_needed()
has been called (and paging.bts is hence set). However, this fix is a safer way
to prevent errors like this in general.

The segfault was introduced by d382bf63e2b7e28fe41c5310c26fe584f0356897 /
If3f53d3bb66ad2dc02db823cb813590c6b59c700

Related: OS#2747
Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840
---
M src/libbsc/paging.c
M src/libcommon/gsm_data_shared.c
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/27/5327/1

diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index 8d54d0a..d657bd3 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -240,7 +240,11 @@
return;
 
bts->paging.bts = bts;
-   INIT_LLIST_HEAD(>paging.pending_requests);
+
+   /* This should be initialized only once. There is currently no code 
that sets bts->paging.bts
+* back to NULL, so let's just assert this one instead of graceful 
handling. */
+   OSMO_ASSERT(llist_empty(>paging.pending_requests));
+
osmo_timer_setup(>paging.work_timer, paging_worker,
 >paging);
 
diff --git a/src/libcommon/gsm_data_shared.c b/src/libcommon/gsm_data_shared.c
index 2f7e7e3..30ef1ca 100644
--- a/src/libcommon/gsm_data_shared.c
+++ b/src/libcommon/gsm_data_shared.c
@@ -364,7 +364,10 @@
 
bts->rach_b_thresh = -1;
bts->rach_ldavg_slots = -1;
+
bts->paging.free_chans_need = -1;
+   INIT_LLIST_HEAD(>paging.pending_requests);
+
bts->features.data = >_features_data[0];
bts->features.data_len = sizeof(bts->_features_data);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfafac4e2c0e0a241a62aecbbdc22be71febf840
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-ttcn3-hacks[master]: Avoid gcc version check

2017-12-13 Thread Max
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/5313

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

Avoid gcc version check

By default the build fails on Debian due to gcc version check in
/usr/include/titan/cversion.h - instead of asking users to manually
change this file let's add workaround to our makefile fixer which
disables this check automatically.

The corresponding Debian bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816

Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328
---
M regen-makefile.sh
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/regen-makefile.sh b/regen-makefile.sh
index 1814699..f757fa3 100755
--- a/regen-makefile.sh
+++ b/regen-makefile.sh
@@ -8,12 +8,16 @@
 #
 # The regexes below patch the generated Makefile to work on Debian 9 and
 # unstable, so far tested with TITAN 6.1.0, 6.2.0 and 6.3.0
+#
 
 ttcn3_makefilegen -l -f $*
 sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile
 sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile
 #sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile
-sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = 
-D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile
+
+# The -DMAKEDEPEND_RUN is a workaround for Debian packaging issue,
+# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 for details
+sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = 
-D$(PLATFORM) -DMAKEDEPEND_RUN -I$(TTCN3_DIR)\/include 
-I\/usr\/include\/titan/' Makefile
 
 # for TITAN 6.3.0
 sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I71c765d5d8e182a198e2c5d2886ebce3b86e6328
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 


python/osmo-python-tests[master]: Use setuptools for packaging

2017-12-13 Thread Max

Patch Set 1:

README describes only basic installation which remains exactly the same. We do 
not have any dependencies described anywhere yet (because distutils does not 
have this concept) and anyway it would have stayed the same: both distutils and 
setuptools are part of the standard library.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I39ee53f352001e47c6df055cbec52d638480253d
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


python/osmo-python-tests[master]: Fix python3 compatibility

2017-12-13 Thread Max

Patch Set 1:

> We do not have comprehensive automatic testing of these scripts anywhere

We don't have any testing, that's why I've added basic tests in 
https://gerrit.osmocom.org/#/c/5277/

> why does this *need* py3 in the first place? "necessary for proper py3 tests" 
> doesn't explain it to me.

If we have code which requires python3 than it have to be tested with python3. 
But before we commit those we have to first make sure the tests are passed. 
That's what this patch does.

> Have you *really* tested it and checked the output?

This is completely pointless discussion. The tests have to be run automatically 
by jenkins for each commit. If you think that the test coverage is insufficient 
than we have to expand tests first. Either way, 
https://gerrit.osmocom.org/#/c/5277/ have to be reviewed and merged first.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[PATCH] osmo-ttcn3-hacks[master]: Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort

2017-12-13 Thread Harald Welte

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

Add RTP_Emulation (stream source/sink) on top of RTP_CodecPort

Change-Id: Ic0750bdc025cd6f16094843550429d976fb44f4f
---
A library/RTP_Emulation.ttcn
1 file changed, 209 insertions(+), 0 deletions(-)


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

diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
new file mode 100644
index 000..b8b1dbe
--- /dev/null
+++ b/library/RTP_Emulation.ttcn
@@ -0,0 +1,209 @@
+module RTP_Emulation {
+
+/* Functionalities that we want this module to imeplement:
+ *  * act as a RTP source that generates a RTP Stream
+ *  * act asaa RTP sink that consumes a RTP Stream
+ *
+ * for all of the above, we want to be able to 
+ *  * specify the payload type
+ *  * specify the interval / sample rate
+ *  * create drop-outs in the stream
+ *  * detect reordered or lost frames
+ *  * validate if the size of the frames matches epectations
+ *  * play back real audio (at least some tones?)
+ *  * enable/disable generation/verification of RTCP
+ */
+
+import from General_Types all;
+import from Osmocom_Types all;
+import from IPL4asp_Types all;
+import from RTP_Types all;
+import from RTP_CodecPort all;
+import from RTP_CodecPort_CtrlFunct all;
+
+type component RTP_Emulation_CT {
+   /* down-facing ports for RTP and RTCP codec ports on top of IPL4asp */
+   port RTP_CODEC_PT RTP;
+   var integer g_rtp_conn_id := -1;
+   port RTP_CODEC_PT RTCP;
+   var integer g_rtcp_conn_id := -1;
+
+   /* user-facing port for controlling the binding */
+   port RTPEM_CTRL_PT CTRL;
+
+   /* configurable by user, should be fixed */
+   var INT7b g_tx_payload_type := 0;
+   var integer g_tx_samplerate_hz := 8000;
+   var integer g_tx_duration_ms := 20;
+   var BIT32_BO_LAST g_tx_ssrc := hex2bit('DEADBEEF'H);
+
+   var HostName g_remote_host;
+   var PortNumber g_remote_port;
+   var HostName g_local_host;
+   var PortNumber g_local_port;
+
+   /* state variables, change over time */
+   var boolean g_rx_enabled := false;
+   var LIN2_BO_LAST g_tx_next_seq := 0;
+   var uint32_t g_tx_next_ts := 0;
+
+   var INT7b g_rx_payload_type := 0;
+   var LIN2_BO_LAST g_rx_last_seq;
+   var uint32_t g_rx_last_ts;
+}
+
+type enumerated RtpemMode {
+   RTPEM_MODE_NONE,
+   RTPEM_MODE_TXONLY,
+   RTPEM_MODE_RXONLY,
+   RTPEM_MODE_BIDIR
+};
+
+signature RTPEM_bind(in HostName local_host, inout PortNumber local_port);
+signature RTPEM_connect(in HostName remote_host, in PortNumber remote_port);
+signature RTPEM_mode(in RtpemMode mode);
+
+type port RTPEM_CTRL_PT procedure {
+   inout RTPEM_bind, RTPEM_connect, RTPEM_mode;
+} with { extension "internal" };
+
+template PDU_RTP ts_RTP(BIT32_BO_LAST ssrc, INT7b pt, LIN2_BO_LAST seq, 
uint32_t ts,
+   octetstring payload, BIT1 marker := '0'B) := {
+   version := 2,
+   padding_ind := '0'B,
+   extension_ind := '0'B,
+   CSRC_count := 0,
+   marker_bit := marker,
+   payload_type := pt,
+   sequence_number := seq,
+   time_stamp := int2bit(ts, 4),
+   SSRC_id := ssrc,
+   CSRCs := omit,
+   ext_header := omit,
+   data := payload
+}
+
+private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on 
RTP_Emulation_CT {
+   var PDU_RTP rtp := valueof(ts_RTP(g_tx_ssrc, g_tx_payload_type, 
g_tx_next_seq,
+ g_tx_next_ts, payload, marker));
+   RTP.send(t_RTP_Send(g_rtp_conn_id, RTP_messages_union:{rtp:=rtp}));
+   /* increment sequence + timestamp for next transmit */
+   g_tx_next_seq := g_tx_next_seq + 1;
+   g_tx_next_ts := g_tx_next_ts + (g_tx_samplerate_hz mod (1000 mod 
g_tx_duration_ms));
+}
+
+function f_main() runs on RTP_Emulation_CT
+{
+   var Result res;
+
+   timer T_transmit := 1000.0/int2float(g_tx_duration_ms);
+   var RTP_RecvFrom rx_rtp;
+   var template RTP_RecvFrom tr := {
+   connId := ?,
+   remName := ?,
+   remPort := ?,
+   locName := ?,
+   locPort := ?,
+   msg := ?
+   };
+   var template RTP_RecvFrom tr_rtp := tr;
+   var template RTP_RecvFrom tr_rtcp := tr;
+   tr_rtp.connId := g_rtp_conn_id;
+   tr_rtp.msg := { rtp := ? };
+   tr_rtp.connId := g_rtcp_conn_id;
+   tr_rtcp.msg := { rtcp := ? };
+
+   while (true) {
+   alt {
+   /* control procedures (calls) from the user */
+   [] CTRL.getcall(RTPEM_bind:{?,?}) -> param(g_local_host, 
g_local_port) {
+   if (g_local_port rem 2 == 1) {
+   //CTRL.raise(RTPEM_bind, "Local Port is not an 
even port number!");
+   log("Local Port is not an even port number!");
+   continue;
+   }
+  

[PATCH] osmo-ttcn3-hacks[master]: move RTP_CodecPort.ttcn to library

2017-12-13 Thread Harald Welte

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

move RTP_CodecPort.ttcn to library

Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3
---
R library/RTP_CodecPort.ttcn
M mgw/gen_links.sh
2 files changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/mgw/RTP_CodecPort.ttcn b/library/RTP_CodecPort.ttcn
similarity index 100%
rename from mgw/RTP_CodecPort.ttcn
rename to library/RTP_CodecPort.ttcn
diff --git a/mgw/gen_links.sh b/mgw/gen_links.sh
index 0b8195e..acdeb40 100755
--- a/mgw/gen_links.sh
+++ b/mgw/gen_links.sh
@@ -37,5 +37,5 @@
 gen_links $DIR $FILES
 
 DIR=../library
-FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn 
MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn 
MGCP_CodecPort_CtrlFunctDef.cc"
+FILES="General_Types.ttcn Osmocom_Types.ttcn MGCP_Types.ttcn 
MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn 
MGCP_CodecPort_CtrlFunctDef.cc RTP_CodecPort.ttcn"
 gen_links $DIR $FILES

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67343f016757c23a85db6b526b6f60476e91ffc3
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmo-ttcn3-hacks[master]: Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files

2017-12-13 Thread Harald Welte

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

Add missing RTP_CodecPort_CtrlFunct TTCN and C++ files

Change-Id: Ic5499a0b5f635a93214cbb5e641d2fd8d37f38d6
---
A library/RTP_CodecPort_CtrlFunct.ttcn
A library/RTP_CodecPort_CtrlFunctDef.cc
2 files changed, 100 insertions(+), 0 deletions(-)


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

diff --git a/library/RTP_CodecPort_CtrlFunct.ttcn 
b/library/RTP_CodecPort_CtrlFunct.ttcn
new file mode 100644
index 000..9f6cad2
--- /dev/null
+++ b/library/RTP_CodecPort_CtrlFunct.ttcn
@@ -0,0 +1,44 @@
+module RTP_CodecPort_CtrlFunct {
+
+  import from RTP_CodecPort all;
+  import from IPL4asp_Types all;
+
+  external function f_IPL4_listen(
+inout RTP_CODEC_PT portRef,
+in HostName locName,
+in PortNumber locPort,
+in ProtoTuple proto,
+in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_connect(
+inout RTP_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 RTP_CODEC_PT portRef,
+in ConnectionId id,
+in ProtoTuple proto := { unspecified := {} }
+  ) return Result;
+
+  external function f_IPL4_setUserData(
+inout RTP_CODEC_PT portRef,
+in ConnectionId id,
+in UserData userData
+  ) return Result;
+
+  external function f_IPL4_getUserData(
+inout RTP_CODEC_PT portRef,
+in ConnectionId id,
+out UserData userData
+  ) return Result;
+
+}
+
diff --git a/library/RTP_CodecPort_CtrlFunctDef.cc 
b/library/RTP_CodecPort_CtrlFunctDef.cc
new file mode 100644
index 000..ce8e176
--- /dev/null
+++ b/library/RTP_CodecPort_CtrlFunctDef.cc
@@ -0,0 +1,56 @@
+#include "IPL4asp_PortType.hh"
+#include "RTP_CodecPort.hh"
+#include "IPL4asp_PT.hh"
+
+namespace RTP__CodecPort__CtrlFunct {
+
+  IPL4asp__Types::Result f__IPL4__listen(
+RTP__CodecPort::RTP__CODEC__PT& portRef,
+const IPL4asp__Types::HostName& locName,
+const IPL4asp__Types::PortNumber& locPort,
+const IPL4asp__Types::ProtoTuple& proto,
+const IPL4asp__Types::OptionList& options)
+  {
+return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, 
options);
+  }
+  
+  IPL4asp__Types::Result f__IPL4__connect(
+RTP__CodecPort::RTP__CODEC__PT& portRef,
+const IPL4asp__Types::HostName& remName,
+const IPL4asp__Types::PortNumber& remPort,
+const IPL4asp__Types::HostName& locName,
+const IPL4asp__Types::PortNumber& locPort,
+const IPL4asp__Types::ConnectionId& connId,
+const IPL4asp__Types::ProtoTuple& proto,
+const IPL4asp__Types::OptionList& options)
+  {
+return f__IPL4__PROVIDER__connect(portRef, remName, remPort,
+  locName, locPort, connId, proto, 
options);
+  }
+
+  IPL4asp__Types::Result f__IPL4__close(
+RTP__CodecPort::RTP__CODEC__PT& portRef, 
+const IPL4asp__Types::ConnectionId& connId, 
+const IPL4asp__Types::ProtoTuple& proto)
+  {
+  return f__IPL4__PROVIDER__close(portRef, connId, proto);
+  }
+
+  IPL4asp__Types::Result f__IPL4__setUserData(
+RTP__CodecPort::RTP__CODEC__PT& portRef,
+const IPL4asp__Types::ConnectionId& connId,
+const IPL4asp__Types::UserData& userData)
+  {
+return f__IPL4__PROVIDER__setUserData(portRef, connId, userData);
+  }
+  
+  IPL4asp__Types::Result f__IPL4__getUserData(
+RTP__CodecPort::RTP__CODEC__PT& portRef,
+const IPL4asp__Types::ConnectionId& connId,
+IPL4asp__Types::UserData& userData)
+  {
+return f__IPL4__PROVIDER__getUserData(portRef, connId, userData);
+  }
+  
+}
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5499a0b5f635a93214cbb5e641d2fd8d37f38d6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[PATCH] osmocom-bb[master]: mobile/vty_interface.c: fix 'channel-capability' description

2017-12-13 Thread Vadim Yanitskiy

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

mobile/vty_interface.c: fix 'channel-capability' description

Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842
---
M src/host/layer23/src/mobile/vty_interface.c
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/23/5323/1

diff --git a/src/host/layer23/src/mobile/vty_interface.c 
b/src/host/layer23/src/mobile/vty_interface.c
index 8767985..37093ce 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -2392,9 +2392,12 @@
return CMD_SUCCESS;
 }
 
-DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd, "channel-capability "
-   "(sdcch|sdcch+tchf|sdcch+tchf+tchh)",
-   "Select channel capability\nSDCCH only\nSDCCH + TCH/F\nSDCCH + TCH/H")
+DEFUN(cfg_ms_sup_ch_cap, cfg_ms_sup_ch_cap_cmd,
+   "channel-capability (sdcch|sdcch+tchf|sdcch+tchf+tchh)",
+   "Select channel capability\n"
+   "SDCCH only\n"
+   "SDCCH + TCH/F\n"
+   "SDCCH + TCH/F + TCH/H")
 {
struct osmocom_ms *ms = vty->index;
struct gsm_settings *set = >settings;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c08e071ffaac9b8e7c4af6a7be2bd8125145842
Gerrit-PatchSet: 1
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 


osmo-gsm-tester[master]: osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun de...

2017-12-13 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[MERGED] osmo-gsm-tester[master]: osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun de...

2017-12-13 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun 
devices
..


osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun devices

This is a temporary workaround to be able to test gprs signalling until
we set up all required bits to run osmo-ggsn in its own namespace.

Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9
---
M src/osmo_gsm_tester/osmo_ggsn.py
M src/osmo_gsm_tester/util.py
2 files changed, 24 insertions(+), 4 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo_gsm_tester/osmo_ggsn.py b/src/osmo_gsm_tester/osmo_ggsn.py
index c11353c..9f23c64 100644
--- a/src/osmo_gsm_tester/osmo_ggsn.py
+++ b/src/osmo_gsm_tester/osmo_ggsn.py
@@ -51,7 +51,14 @@
 pcap_recorder.PcapRecorder(self.suite_run, 
self.run_dir.new_dir('pcap'), None,
'host %s' % self.addr())
 
-env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) }
+env = {}
+
+# setting capabilities will later disable use of LD_LIBRARY_PATH from 
ELF loader -> modify RPATH instead.
+self.log('Setting RPATH for osmo-ggsn')
+util.change_elf_rpath(binary, util.prepend_library_path(lib), 
self.run_dir.new_dir('patchelf'))
+# osmo-ggsn requires CAP_NET_ADMIN to create tunnel devices: 
ioctl(TUNSETIFF):
+self.log('Applying CAP_NET_ADMIN capability to osmo-ggsn')
+util.setcap_net_admin(binary, self.run_dir.new_dir('setcap_net_admin'))
 
 self.dbg(run_dir=self.run_dir, binary=binary, env=env)
 self.process = process.Process(self.name(), self.run_dir,
diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py
index 8fb6e19..ed1a258 100644
--- a/src/osmo_gsm_tester/util.py
+++ b/src/osmo_gsm_tester/util.py
@@ -68,12 +68,25 @@
 osmo-gsm-tester. See osmo-gsm-tester manual for more information.
 '''
 from .process import Process
-SETCAP_NET_BIN = 'osmo-gsm-tester_setcap_net_raw.sh'
-proc = Process(SETCAP_NET_BIN, run_dir, ['sudo', 
'osmo-gsm-tester_setcap_net_raw.sh', binary])
+SETCAP_NET_RAW_BIN = 'osmo-gsm-tester_setcap_net_raw.sh'
+proc = Process(SETCAP_NET_RAW_BIN, run_dir, ['sudo', SETCAP_NET_RAW_BIN, 
binary])
 proc.launch()
 proc.wait()
 if proc.result != 0:
-raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_BIN, 
proc.result))
+raise RuntimeError('%s finished with err code %d' % 
(SETCAP_NET_RAW_BIN, proc.result))
+
+def setcap_net_admin(binary, run_dir):
+'''
+This functionality requires specific setup on the host running
+osmo-gsm-tester. See osmo-gsm-tester manual for more information.
+'''
+from .process import Process
+SETCAP_NET_ADMIN_BIN = 'osmo-gsm-tester_setcap_net_admin.sh'
+proc = Process(SETCAP_NET_ADMIN_BIN, run_dir, ['sudo', 
SETCAP_NET_ADMIN_BIN, binary])
+proc.launch()
+proc.wait()
+if proc.result != 0:
+raise RuntimeError('%s finished with err code %d' % 
(SETCAP_NET_ADMIN_BIN, proc.result))
 
 class listdict(dict):
 'a dict of lists { "a": [1, 2, 3],  "b": [1, 2] }'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


[PATCH] osmo-gsm-tester[master]: osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun de...

2017-12-13 Thread Pau Espin Pedrol

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

osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun devices

This is a temporary workaround to be able to test gprs signalling until
we set up all required bits to run osmo-ggsn in its own namespace.

Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9
---
M src/osmo_gsm_tester/osmo_ggsn.py
M src/osmo_gsm_tester/util.py
2 files changed, 24 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/22/5322/1

diff --git a/src/osmo_gsm_tester/osmo_ggsn.py b/src/osmo_gsm_tester/osmo_ggsn.py
index c11353c..9f23c64 100644
--- a/src/osmo_gsm_tester/osmo_ggsn.py
+++ b/src/osmo_gsm_tester/osmo_ggsn.py
@@ -51,7 +51,14 @@
 pcap_recorder.PcapRecorder(self.suite_run, 
self.run_dir.new_dir('pcap'), None,
'host %s' % self.addr())
 
-env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) }
+env = {}
+
+# setting capabilities will later disable use of LD_LIBRARY_PATH from 
ELF loader -> modify RPATH instead.
+self.log('Setting RPATH for osmo-ggsn')
+util.change_elf_rpath(binary, util.prepend_library_path(lib), 
self.run_dir.new_dir('patchelf'))
+# osmo-ggsn requires CAP_NET_ADMIN to create tunnel devices: 
ioctl(TUNSETIFF):
+self.log('Applying CAP_NET_ADMIN capability to osmo-ggsn')
+util.setcap_net_admin(binary, self.run_dir.new_dir('setcap_net_admin'))
 
 self.dbg(run_dir=self.run_dir, binary=binary, env=env)
 self.process = process.Process(self.name(), self.run_dir,
diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py
index 8fb6e19..ed1a258 100644
--- a/src/osmo_gsm_tester/util.py
+++ b/src/osmo_gsm_tester/util.py
@@ -68,12 +68,25 @@
 osmo-gsm-tester. See osmo-gsm-tester manual for more information.
 '''
 from .process import Process
-SETCAP_NET_BIN = 'osmo-gsm-tester_setcap_net_raw.sh'
-proc = Process(SETCAP_NET_BIN, run_dir, ['sudo', 
'osmo-gsm-tester_setcap_net_raw.sh', binary])
+SETCAP_NET_RAW_BIN = 'osmo-gsm-tester_setcap_net_raw.sh'
+proc = Process(SETCAP_NET_RAW_BIN, run_dir, ['sudo', SETCAP_NET_RAW_BIN, 
binary])
 proc.launch()
 proc.wait()
 if proc.result != 0:
-raise RuntimeError('%s finished with err code %d' % (SETCAP_NET_BIN, 
proc.result))
+raise RuntimeError('%s finished with err code %d' % 
(SETCAP_NET_RAW_BIN, proc.result))
+
+def setcap_net_admin(binary, run_dir):
+'''
+This functionality requires specific setup on the host running
+osmo-gsm-tester. See osmo-gsm-tester manual for more information.
+'''
+from .process import Process
+SETCAP_NET_ADMIN_BIN = 'osmo-gsm-tester_setcap_net_admin.sh'
+proc = Process(SETCAP_NET_ADMIN_BIN, run_dir, ['sudo', 
SETCAP_NET_ADMIN_BIN, binary])
+proc.launch()
+proc.wait()
+if proc.result != 0:
+raise RuntimeError('%s finished with err code %d' % 
(SETCAP_NET_ADMIN_BIN, proc.result))
 
 class listdict(dict):
 'a dict of lists { "a": [1, 2, 3],  "b": [1, 2] }'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] osmo-bsc[master]: paging: paging_flush_bts: be sure pending_requests is inital...

2017-12-13 Thread dexter

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

paging: paging_flush_bts: be sure pending_requests is initalized

The BSSMAP reset causes the paging requests to be flushed. When
this happens right after startup then calling paging_flush_bts()
may be called when the list bts->paging.pending_requests is not
yet initalized, which causes a segfault.

Call paging_init_if_needed() to be sure that the list is
inizalized (like the other functions also do)

Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc
---
M src/libbsc/paging.c
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/21/5321/1

diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index 8d54d0a..e9d122e 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -473,6 +473,8 @@
 {
struct gsm_paging_request *req, *req2;
 
+   paging_init_if_needed(bts);
+
llist_for_each_entry_safe(req, req2, >paging.pending_requests, 
entry) {
if (msc && req->msc != msc)
continue;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


osmo-ttcn3-hacks[master]: Avoid gcc version check

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+1

might make sense to refer to the fact that this is a debian-specific bug report 
and also refer to Debian 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816

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

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


osmo-ttcn3-hacks[master]: Add generic link functions

2017-12-13 Thread Harald Welte

Patch Set 3:

I'm not quite sure if it's worth optimizing this, given that there is a proper 
solution in TITAN that avoids working with symlinks.  I haven't used it yet, 
but it relates to the .grp XML files that ship with their libraries.  
ttcn3_makefilegen can work with those, but I haven't studied this in detail.  
Let's not get distracted and focus on our actual work extending our test 
coverage and once somebody has some spare time to figure out how to work with 
.grp files try to adopt that.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2aaab05ebe19e5f18c03806069197be0e1304a0b
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: Fix rmlink.sh

2017-12-13 Thread Harald Welte

Patch Set 3: Code-Review+2

the script is to be run from within one of the test cases, i.e. from within 
osmo-ttcn3-hacks/bsc, then the issue you are fixing won't occur.  But it seems 
your patch won't hurt.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-HasComments: No


[MERGED] osmo-gsm-tester[master]: OsmoNitb: Introduce bts_is_connected API

2017-12-13 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: OsmoNitb: Introduce bts_is_connected API
..


OsmoNitb: Introduce bts_is_connected API

This can be used by tests to wait until bts is successfully connected to
NITB.

Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832
---
M src/osmo_gsm_tester/osmo_nitb.py
1 file changed, 27 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Harald Welte: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py
index 6dd7342..48037a6 100644
--- a/src/osmo_gsm_tester/osmo_nitb.py
+++ b/src/osmo_gsm_tester/osmo_nitb.py
@@ -114,6 +114,13 @@
 def mcc_mnc(self):
 return (self.mcc(), self.mnc())
 
+def bts_num(self, bts):
+'Provide number id used by OsmoNITB to identify configured BTS'
+# We take advantage from the fact that VTY code assigns VTY in 
ascending
+# order through the bts nodes found. As we populate the config 
iterating
+# over this list, we have a 1:1 match in indexes.
+return self.bts.index(bts)
+
 def subscriber_add(self, modem, msisdn=None, algo=None):
 if msisdn is None:
 msisdn = self.suite_run.resources_pool.next_msisdn(modem)
@@ -148,6 +155,9 @@
 def imsi_list_attached(self):
 return OsmoNitbCtrl(self).subscriber_list_active()
 
+def bts_is_connected(self, bts):
+return OsmoNitbCtrl(self).bts_is_connected(self.bts_num(bts))
+
 def running(self):
 return not self.process.terminated()
 
@@ -159,6 +169,8 @@
 SUBSCR_DELETE_VAR = 'subscriber-delete-v1'
 SUBSCR_DELETE_REPLY_RE = re.compile("SET_REPLY (\d+) %s Removed" % 
SUBSCR_DELETE_VAR)
 SUBSCR_LIST_ACTIVE_VAR = 'subscriber-list-active-v1'
+BTS_OML_STATE_VAR = "bts.%d.oml-connection-state"
+BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) 
bts.\d+.oml-connection-state (?P\w+)")
 
 def __init__(self, nitb):
 self.nitb = nitb
@@ -210,4 +222,19 @@
 aslist_str = answer_str
 return aslist_str
 
+def bts_is_connected(self, bts_num):
+with self.ctrl() as ctrl:
+ctrl.do_get(OsmoNitbCtrl.BTS_OML_STATE_VAR % bts_num)
+data = ctrl.receive()
+while (len(data) > 0):
+(answer, data) = ctrl.remove_ipa_ctrl_header(data)
+answer_str = answer.decode('utf-8')
+answer_str = answer_str.replace('\n', ' ')
+res = OsmoNitbCtrl.BTS_OML_STATE_RE.match(answer_str)
+if res:
+oml_state = str(res.group('oml_state'))
+if oml_state == 'connected':
+return True
+return False
+
 # vim: expandtab tabstop=4 shiftwidth=4

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API

2017-12-13 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: OsmoBsc: Introduce bts_is_connected API
..


OsmoBsc: Introduce bts_is_connected API

This can be used by tests to wait until bts is successfully connected to
BSC.

Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2
---
M src/osmo_gsm_tester/osmo_bsc.py
1 file changed, 39 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Harald Welte: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/osmo_gsm_tester/osmo_bsc.py b/src/osmo_gsm_tester/osmo_bsc.py
index 7424fb4..2c909bc 100644
--- a/src/osmo_gsm_tester/osmo_bsc.py
+++ b/src/osmo_gsm_tester/osmo_bsc.py
@@ -18,6 +18,7 @@
 # along with this program.  If not, see .
 
 import os
+import re
 import pprint
 
 from . import log, util, config, template, process, osmo_ctrl, pcap_recorder
@@ -108,7 +109,45 @@
 self.bts.append(bts)
 bts.set_bsc(self)
 
+def bts_num(self, bts):
+'Provide number id used by OsmoNITB to identify configured BTS'
+# We take advantage from the fact that VTY code assigns VTY in 
ascending
+# order through the bts nodes found. As we populate the config 
iterating
+# over this list, we have a 1:1 match in indexes.
+return self.bts.index(bts)
+
+def bts_is_connected(self, bts):
+return OsmoBscCtrl(self).bts_is_connected(self.bts_num(bts))
+
 def running(self):
 return not self.process.terminated()
 
+
+class OsmoBscCtrl(log.Origin):
+PORT = 4249
+BTS_OML_STATE_VAR = "bts.%d.oml-connection-state"
+BTS_OML_STATE_RE = re.compile("GET_REPLY (\d+) 
bts.\d+.oml-connection-state (?P\w+)")
+
+def __init__(self, bsc):
+self.bsc = bsc
+super().__init__(log.C_BUS, 'CTRL(%s:%d)' % (self.bsc.addr(), 
OsmoBscCtrl.PORT))
+
+def ctrl(self):
+return osmo_ctrl.OsmoCtrl(self.bsc.addr(), OsmoBscCtrl.PORT)
+
+def bts_is_connected(self, bts_num):
+with self.ctrl() as ctrl:
+ctrl.do_get(OsmoBscCtrl.BTS_OML_STATE_VAR % bts_num)
+data = ctrl.receive()
+while (len(data) > 0):
+(answer, data) = ctrl.remove_ipa_ctrl_header(data)
+answer_str = answer.decode('utf-8')
+answer_str = answer_str.replace('\n', ' ')
+res = OsmoBscCtrl.BTS_OML_STATE_RE.match(answer_str)
+if res:
+oml_state = str(res.group('oml_state'))
+if oml_state == 'connected':
+return True
+return False
+
 # vim: expandtab tabstop=4 shiftwidth=4

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing

2017-12-13 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: suites: Wait for BTS to connect to BSC before continuing
..


suites: Wait for BTS to connect to BSC before continuing

Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396
---
M suites/aoip_debug/interactive.py
M suites/aoip_encryption/register_a5_0_authopt.py
M suites/aoip_encryption/register_a5_0_authreq.py
M suites/aoip_encryption/register_a5_1_authreq.py
M suites/aoip_smpp/esme_ms_sms_storeforward.py
M suites/aoip_smpp/esme_ms_sms_transaction.py
M suites/aoip_sms/mo_mt_sms.py
M suites/aoip_ussd/assert_extension.py
M suites/debug/interactive.py
M suites/gprs/ping.py
M suites/netreg/register.py
M suites/netreg/register_default.py
M suites/smpp/esme_ms_sms_storeforward.py
M suites/smpp/esme_ms_sms_transaction.py
M suites/sms/mo_mt_sms.py
M suites/ussd/assert_extension.py
M suites/voice/mo_mt_call.py
17 files changed, 18 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/suites/aoip_debug/interactive.py b/suites/aoip_debug/interactive.py
index 312083a..b08bac1 100755
--- a/suites/aoip_debug/interactive.py
+++ b/suites/aoip_debug/interactive.py
@@ -26,6 +26,8 @@
 bsc.start()
 
 bts.start()
+print('Waiting for bts to connect to bsc...')
+wait(bsc.bts_is_connected, bts)
 print('Waiting for bts to be ready...')
 wait(bts.ready_for_pcu)
 pcu.start()
diff --git a/suites/aoip_encryption/register_a5_0_authopt.py 
b/suites/aoip_encryption/register_a5_0_authopt.py
index 75614e2..6a06078 100755
--- a/suites/aoip_encryption/register_a5_0_authopt.py
+++ b/suites/aoip_encryption/register_a5_0_authopt.py
@@ -22,6 +22,7 @@
 bsc.bts_add(bts)
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 ms.log_info()
 good_ki = ms.ki()
diff --git a/suites/aoip_encryption/register_a5_0_authreq.py 
b/suites/aoip_encryption/register_a5_0_authreq.py
index 07293d2..d6c67ea 100755
--- a/suites/aoip_encryption/register_a5_0_authreq.py
+++ b/suites/aoip_encryption/register_a5_0_authreq.py
@@ -22,6 +22,7 @@
 bsc.bts_add(bts)
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 ms.log_info()
 good_ki = ms.ki()
diff --git a/suites/aoip_encryption/register_a5_1_authreq.py 
b/suites/aoip_encryption/register_a5_1_authreq.py
index 190e5bb..b2c446f 100755
--- a/suites/aoip_encryption/register_a5_1_authreq.py
+++ b/suites/aoip_encryption/register_a5_1_authreq.py
@@ -22,6 +22,7 @@
 bsc.bts_add(bts)
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 ms.log_info()
 good_ki = ms.ki()
diff --git a/suites/aoip_smpp/esme_ms_sms_storeforward.py 
b/suites/aoip_smpp/esme_ms_sms_storeforward.py
index 79c570e..9effe6d 100755
--- a/suites/aoip_smpp/esme_ms_sms_storeforward.py
+++ b/suites/aoip_smpp/esme_ms_sms_storeforward.py
@@ -32,6 +32,7 @@
 mgw_bsc.start()
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 esme.connect()
 hlr.subscriber_add(ms)
diff --git a/suites/aoip_smpp/esme_ms_sms_transaction.py 
b/suites/aoip_smpp/esme_ms_sms_transaction.py
index e20b2b6..190879d 100755
--- a/suites/aoip_smpp/esme_ms_sms_transaction.py
+++ b/suites/aoip_smpp/esme_ms_sms_transaction.py
@@ -30,6 +30,7 @@
 mgw_bsc.start()
 bsc.start()
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 esme.connect()
 hlr.subscriber_add(ms)
diff --git a/suites/aoip_sms/mo_mt_sms.py b/suites/aoip_sms/mo_mt_sms.py
index 76b7e51..6ce460f 100755
--- a/suites/aoip_sms/mo_mt_sms.py
+++ b/suites/aoip_sms/mo_mt_sms.py
@@ -21,6 +21,7 @@
 bsc.start()
 
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 hlr.subscriber_add(ms_mo)
 hlr.subscriber_add(ms_mt)
diff --git a/suites/aoip_ussd/assert_extension.py 
b/suites/aoip_ussd/assert_extension.py
index 181f07f..5969b01 100755
--- a/suites/aoip_ussd/assert_extension.py
+++ b/suites/aoip_ussd/assert_extension.py
@@ -22,6 +22,7 @@
 bsc.start()
 
 bts.start()
+wait(bsc.bts_is_connected, bts)
 
 hlr.subscriber_add(ms)
 
diff --git a/suites/debug/interactive.py b/suites/debug/interactive.py
index 6df5b6d..595cfd9 100755
--- a/suites/debug/interactive.py
+++ b/suites/debug/interactive.py
@@ -10,6 +10,7 @@
 nitb.bts_add(bts)
 nitb.start()
 bts.start()
+wait(nitb.bts_is_connected, bts)
 
 for m in modems:
   nitb.subscriber_add(m)
diff --git a/suites/gprs/ping.py b/suites/gprs/ping.py
index f6f01a6..1b6d85c 100755
--- a/suites/gprs/ping.py
+++ b/suites/gprs/ping.py
@@ -27,6 +27,7 @@
 bsc.start()
 
 bts.start()
+wait(bsc.bts_is_connected, bts)
 print('Waiting for bts to be ready...')
 wait(bts.ready_for_pcu)
 pcu.start()
diff --git a/suites/netreg/register.py b/suites/netreg/register.py
index 9807d2b..d5fbeb7 100755
--- a/suites/netreg/register.py
+++ b/suites/netreg/register.py
@@ -10,6 +10,7 @@
 nitb.bts_add(bts)
 nitb.start()
 bts.start()
+wait(nitb.bts_is_connected, bts)
 
 nitb.subscriber_add(ms)
 
diff --git a/suites/netreg/register_default.py 
b/suites/netreg/register_default.py
index 

osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing

2017-12-13 Thread Pau Espin Pedrol

Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/5276/2/suites/voice/mo_mt_call.py
File suites/voice/mo_mt_call.py:

Line 26: hlr.subscriber_add(ms_mo)
> (true, but will not make a noticeable difference in execution time)
I agree that it would be better in terms of dependencies and timing, but the 
difference would not be really noticeable and I wanted to avoid mangling more 
lines than necessary.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams

2017-12-13 Thread dexter

Patch Set 11:

(70 comments)

Actually we should not merge this patch until we did not solve the problems 
with 3G (rab assignment response not parsed).

For the other topic, please see my email.

https://gerrit.osmocom.org/#/c/4980/2//COMMIT_MSG
Commit Message:

Line 15: Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c
> please use the tag as "Depends: foo" to match general tag syntax like below
Done


https://gerrit.osmocom.org/#/c/4980/2/include/osmocom/msc/msc_ifaces.h
File include/osmocom/msc/msc_ifaces.h:

Line 44
> -1: msc_ifaces.h/c didn't really turn out as clearly as I had intended... B
Done


https://gerrit.osmocom.org/#/c/4980/2/include/osmocom/msc/msc_mgcp.h
File include/osmocom/msc/msc_mgcp.h:

Line 33: 
> ?: I wonder whether rtp_endpoint and the conn_ids should rather be part of 
The structs are similar, however I would not include this into the mgcp_client 
API. It is not guaranteed that every client will use exactly one connection. 
Integrating this into the client would require some more elaborated approach. 
We would have to manage the connection IDs some how, which means we would have 
to track open connections, add CRCX and remove connection IDs to lists on DLCX. 
This would be rather complex. I think letting the user tracking the connection 
IDs is pretty ok.


https://gerrit.osmocom.org/#/c/4980/11/include/osmocom/msc/msc_mgcp.h
File include/osmocom/msc/msc_mgcp.h:

Line 26: /* MGCP state handler context (fsm etc..) */
> explain the scope? mgcp context for one call leg? one subscriber?
Done


Line 31:/* RTP endpoint number */
> (omit comments that just mirror the variable name; explain what the endpoin
Done


Line 35: * needed */
> use line width instead of wrapping short lines
Done


https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/a_iface.c
File src/libmsc/a_iface.c:

Line 412:   rtp_addr_in.sin_addr.s_addr = 
inet_addr(conn->rtp.local_addr_ran);
> needs some error checking. man inet_addr:
Done


https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/gsm_04_08.c
File src/libmsc/gsm_04_08.c:

Line 1333:  /* Initiate the teadown of the related connections on the MGW */
> "teadown"
Done


Line 1390: /* helper function for tch_bridge() to bridge the RTP Voice streams 
also */
> (I find "helper function for" is something you could write everywhere; I al
The "helper function for" serves basically the purpose to mark the function as 
a nested function. Unfortunately we do not have nested functions in C (see also 
pascal).

Actually we do not need to have this in a separate function anyway so I removed 
it.


Line 2691:  uint32_t addr = inet_addr(trans->conn->rtp.local_addr_cn);
> inet_addr, error checking
Done


https://gerrit.osmocom.org/#/c/4980/11/src/libmsc/iucs.c
File src/libmsc/iucs.c:

Line 226:" rtp=%x:%u, use_x213_nsap=%d\n", conn_id, rab_id, rtp_ip,
> I would have said, use line width, but this is just moving code, right?
I have corrected the formatting of the whole function now. This is code that 
had been moved from msc_ifaces.c to here.

(splitting the log strings is a coding style violation anyway, so I 
concatenated the strings again and corrected the the formatting)


Line 235:" conn_id=%d rab_id=%d rtp=%x:%u\n",
> same
Done


https://gerrit.osmocom.org/#/c/4980/2/src/libmsc/msc_ifaces.c
File src/libmsc/msc_ifaces.c:

Line 194
> looks like callers should just call msc_mgcp_call_assignment() directly.
Done


Line 249
> looks like callers should just call msc_mgcp_call_release() directly.
Done


https://gerrit.osmocom.org/#/c/4980/2/src/libmsc/msc_mgcp.c
File src/libmsc/msc_mgcp.c:

Line 47: #define MGCP_RAN_TIMEOUT 10/* in seconds */
> -1: prefer msc_mgcp_ instead of int_ because if you follow this scheme, we 
Done


Line 59:MGCP_ERR_MGW_FAIL,
> -1: typical naming would be
Done


Line 93:ST_CALL,
> -1: again you are using the same general struct name, just 'fsm_', like in 
Done


Line 126:* the CN side */
> fsm_
Done


Line 217: {
> -1: again, you do not need to log FSM states or events, the FSM code does t
Done


Line 222:   int rc;
> -1: best use "0x%x" so we always know it is logged in hex. Are you sure it 
osmo-mgw parses the numerical digit as hexadecimal number, so yes we should 
display it in hexadecimal here too.


Line 240:   if (snprintf(mgcp_msg.endpoint, MGCP_ENDPOINT_MAXLEN, 
MGCP_ENDPOINT_FORMAT, mgcp_ctx->rtp_endpoint) >=
> (wondering whether this log line adds any info to the log, since the FSM al
Done


Line 248:   /* Transmit MGCP message to MGW */
> lol, return at the end of a void function? (some more below)
Done


Line 319:   handle_error(mgcp_ctx, MGCP_ERR_UNEXP_TEARDOWN);
> nope
Done


Line 422:   goto error;
> nope
Done


Line 442:* of the side pointing towards the BSS should be already 
communicated
> (code dup: could have one handle_error(...) below and goto assignment_fail 
Done


Line 460:   struct 

python/osmo-python-tests[master]: Fix python3 compatibility

2017-12-13 Thread Neels Hofmeyr

Patch Set 1:

> > have you verified that these tools work as expected in both py2
 > and py3?
 > 
 > py2 is verified in gerrit 5277, py3 verification is added in
 > follow-up patch.

We do not have comprehensive automatic testing of these scripts anywhere, so it 
would involve manual testing.

Hence I would welcome a rationale: why does this *need* py3 in the first place? 
"necessary for proper py3 tests" doesn't explain it to me. Why is it necessary 
in particular?

I would be more comfortable sticking with py2 where we have it, and for new 
projects use the fully-py3 osmo_interact_* code instead.


 > > will no longer work in py2
 > 
 > it works for me but we should first merge the jenkins integration
 > and than let it be tested automatically.

IIUC it cannot possibly work, since in py2 the syntax is completely different. 
Your change will print a tuple or something, but I wonder whether ('abc', 
file=xyz) is actually valid tuple syntax.

You are of course aware that it's not like C where errors are caught 
immediately, in py you have to hit the actual code path to be sure that the 
syntax has the desired effect. Have you *really* tested it and checked the 
output?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib10dfbec18202245031a634fc3f19677fc952e60
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing

2017-12-13 Thread Neels Hofmeyr

Patch Set 2: Code-Review+2

(1 comment)

https://gerrit.osmocom.org/#/c/5276/2/suites/voice/mo_mt_call.py
File suites/voice/mo_mt_call.py:

Line 26: hlr.subscriber_add(ms_mo)
> you can probably add the subscribers to the HLR before/while waiting for th
(true, but will not make a noticeable difference in execution time)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API

2017-12-13 Thread Neels Hofmeyr

Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-tester[master]: OsmoNitb: Introduce bts_is_connected API

2017-12-13 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: mgcp: validate rtp connection data in MGW response (ip/port)

2017-12-13 Thread dexter

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

mgcp: validate rtp connection data in MGW response (ip/port)

Currently the pasing results from the RTP ip/port are fed into
inet_addr without checking the results.

Check the return code of inet_addr to be sure that the IP-Address
got properly decoded.

Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb
---
M src/osmo-bsc/osmo_bsc_mgcp.c
1 file changed, 18 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/20/5320/1

diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c
index 39ae9d0..a3676e4 100644
--- a/src/osmo-bsc/osmo_bsc_mgcp.c
+++ b/src/osmo-bsc/osmo_bsc_mgcp.c
@@ -198,6 +198,7 @@
struct mgcp_ctx *mgcp_ctx = priv;
int rc;
struct osmo_bsc_sccp_con *conn;
+   uint32_t addr;
 
OSMO_ASSERT(mgcp_ctx);
conn = mgcp_ctx->conn;
@@ -227,13 +228,20 @@
return;
}
 
+   addr = inet_addr(r->audio_ip);
+   if (addr == INADDR_NONE) {
+   LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/BTS: Cannot parse 
response (invalid IP-address)\n");
+   handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP);
+   return;
+   }
+
LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/BTS: MGW responded with 
address %s:%u\n", r->audio_ip, r->audio_port);
 
/* Set the connection details in the conn struct. The code that
 * controls the BTS via RSL will take these values and signal them
 * to the BTS via RSL/IPACC */
conn->rtp_port = r->audio_port;
-   conn->rtp_ip = osmo_ntohl(inet_addr(r->audio_ip));
+   conn->rtp_ip = osmo_ntohl(addr);
 
/* Notify the FSM that we got the response. */
osmo_fsm_inst_dispatch(mgcp_ctx->fsm, EV_CRCX_BTS_RESP, mgcp_ctx);
@@ -480,6 +488,7 @@
struct osmo_bsc_sccp_con *conn;
struct gsm_lchan *lchan;
struct sockaddr_in *sin;
+   uint32_t addr;
 
OSMO_ASSERT(mgcp_ctx);
conn = mgcp_ctx->conn;
@@ -511,13 +520,20 @@
return;
}
 
+   addr = inet_addr(r->audio_ip);
+   if (addr == INADDR_NONE) {
+   LOGPFSML(mgcp_ctx->fsm, LOGL_ERROR, "CRCX/NET: Cannot parse 
response (invalid IP-address)\n");
+   handle_error(mgcp_ctx, MGCP_ERR_MGW_INVAL_RESP);
+   return;
+   }
+
LOGPFSML(mgcp_ctx->fsm, LOGL_DEBUG, "CRCX/NET: MGW responded with 
address %s:%u\n",
 r->audio_ip, r->audio_port);
 
/* Store address */
sin = (struct sockaddr_in *)>aoip_rtp_addr_local;
sin->sin_family = AF_INET;
-   sin->sin_addr.s_addr = inet_addr(r->audio_ip);
+   sin->sin_addr.s_addr = addr;
sin->sin_port = osmo_ntohs(r->audio_port);
 
/* Notify the FSM that we got the response. */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d0aa7e9b8480e1bef57269e3904399cb99815bb
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-mgw[master]: client: mgcp_response_parse_params: check rtp port

2017-12-13 Thread dexter

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

client: mgcp_response_parse_params: check rtp port

Also check the port number for plausibility like we do it
already for the IP-Address

Change-Id: I594a06fc9dd1bf0522f6e72a8943df52448d2ce4
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/18/5318/1

diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index 1c35aa9..7e07d00 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -180,6 +180,9 @@
   >audio_port) != 1)
goto response_parse_failure;
 
+   if (r->audio_port == 0)
+   goto response_parse_failure;
+
return 0;
 
 response_parse_failure:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I594a06fc9dd1bf0522f6e72a8943df52448d2ce4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-bsc[master]: cosmetic: osmo_bsc_mgcp: improve comments

2017-12-13 Thread dexter

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

cosmetic: osmo_bsc_mgcp: improve comments

Make the comments for struct mgcp_ctx more expressive

Change-Id: Ie80b4915055e3f944ff1870c38e3609197ab72b2
---
M include/osmocom/bsc/osmo_bsc_mgcp.h
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/19/5319/1

diff --git a/include/osmocom/bsc/osmo_bsc_mgcp.h 
b/include/osmocom/bsc/osmo_bsc_mgcp.h
index f7106b6..7452513 100644
--- a/include/osmocom/bsc/osmo_bsc_mgcp.h
+++ b/include/osmocom/bsc/osmo_bsc_mgcp.h
@@ -23,12 +23,17 @@
 #include 
 #include 
 
-/* MGCP state handler context (fsm etc..) */
+/* MGCP state handler context. This context information stores all information
+ * to handle the direction of the RTP streams via MGCP. There is one instance
+ * of this context struct per subscriber connection.
+ * (see also struct osmo_bsc_sccp_con) */
 struct mgcp_ctx {
/* FSM instance, which handles the connection switching procedure */
struct osmo_fsm_inst *fsm;
 
-   /* RTP endpoint number */
+   /* RTP endpoint number. This number number identifies the endpoint
+* on the MGW on which the BTS and NET connection is created. This
+* endpoint number is assigned and released automatically. */
uint16_t rtp_endpoint;
 
/* RTP connection identifiers */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie80b4915055e3f944ff1870c38e3609197ab72b2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-msc[master]: mgcp: use osmo-mgw to switch rtp streams

2017-12-13 Thread dexter
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/4980

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

mgcp: use osmo-mgw to switch rtp streams

in the current implementation we still use osmo-bsc_mgcp, which
has many problems and is also obsoleted by osmo-mgw.

integrate osmo-mgw and re-implement the current switching using
an osmo fsm.

Depends: osmo-mgw Iab6a6038e7610c62f34e642cd49c93d11151252c
Closes: OS#2605
Change-Id: Ieea9630358b3963261fa1993cf1f3b563ff23538
---
M include/osmocom/msc/Makefile.am
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/iucs.h
M include/osmocom/msc/msc_ifaces.h
A include/osmocom/msc/msc_mgcp.h
M src/libmsc/Makefile.am
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/iucs.c
M src/libmsc/msc_ifaces.c
A src/libmsc/msc_mgcp.c
M tests/msc_vlr/Makefile.am
M tests/msc_vlr/msc_vlr_tests.c
14 files changed, 1,279 insertions(+), 321 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/80/4980/12

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 1419e8e..052d830 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -39,6 +39,7 @@
mncc.h \
mncc_int.h \
msc_ifaces.h \
+   msc_mgcp.h \
network_listen.h \
oap_client.h \
openbscdefines.h \
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 696cef1..9106421 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -196,9 +196,17 @@
struct gsm_encr encr;
 
struct {
+   struct mgcp_ctx *mgcp_ctx;
unsigned int mgcp_rtp_endpoint;
-   uint16_t port_subscr;
-   uint16_t port_cn;
+
+   uint16_t local_port_ran;
+   char local_addr_ran[INET_ADDRSTRLEN];
+   uint16_t remote_port_ran;
+   char remote_addr_ran[INET_ADDRSTRLEN];
+   uint16_t local_port_cn;
+   char local_addr_cn[INET_ADDRSTRLEN];
+   uint16_t remote_port_cn;
+   char remote_addr_cn[INET_ADDRSTRLEN];
} rtp;
 
/* which Iu-CS connection, if any. */
diff --git a/include/osmocom/msc/iucs.h b/include/osmocom/msc/iucs.h
index b7d6064..a48a316 100644
--- a/include/osmocom/msc/iucs.h
+++ b/include/osmocom/msc/iucs.h
@@ -1,7 +1,10 @@
 #pragma once
 
+#include 
+
 int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg,
uint16_t *lac);
 
 struct gsm_subscriber_connection *subscr_conn_lookup_iu(struct gsm_network 
*network,
struct 
ranap_ue_conn_ctx *ue);
+int iu_rab_act_cs(struct gsm_trans *trans);
diff --git a/include/osmocom/msc/msc_ifaces.h b/include/osmocom/msc/msc_ifaces.h
index 0592c07..ca25e9d 100644
--- a/include/osmocom/msc/msc_ifaces.h
+++ b/include/osmocom/msc/msc_ifaces.h
@@ -37,7 +37,3 @@
 enum gsm48_reject_value value);
 
 int msc_tx_common_id(struct gsm_subscriber_connection *conn);
-int msc_call_assignment(struct gsm_trans *trans);
-int msc_call_bridge(struct gsm_trans *trans1, struct gsm_trans *trans2);
-void msc_call_release(struct gsm_trans *trans);
-int msc_call_connect(struct gsm_trans *trans, uint16_t port, uint32_t ip);
diff --git a/include/osmocom/msc/msc_mgcp.h b/include/osmocom/msc/msc_mgcp.h
new file mode 100644
index 000..2fd44ef
--- /dev/null
+++ b/include/osmocom/msc/msc_mgcp.h
@@ -0,0 +1,56 @@
+/* (C) 2017 by sysmocom - s.f.m.c. GmbH 
+ * All Rights Reserved
+ *
+ * Author: Philipp Maier
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see .
+ *
+ */
+
+#pragma once
+
+#include 
+#include 
+
+/* MGCP state handler context. This context information stores all information
+ * to handle the direction of the RTP streams via MGCP. There is one instance
+ * of this context struct per subscriber connection.
+ * (see also struct gsm_subscriber_connection) */
+struct mgcp_ctx {
+   /* FSM instance, which handles the connection switching procedure */
+   struct osmo_fsm_inst *fsm;
+
+   /* RTP endpoint number. This number number identifies the endpoint
+* on the MGW on which the RAN and CN connection is created. This
+ 

[PATCH] osmo-ttcn3-hacks[master]: Ignore build byproducts

2017-12-13 Thread Max

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

Ignore build byproducts

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


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

diff --git a/.gitignore b/.gitignore
index ccb08fa..d525ada 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
 bin/*.hh
 *.o
 *.log
+*.so
+compile

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a677a809f372a147cd4855abe3f0db14f738450
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-ttcn3-hacks[master]: Fix rmlink.sh

2017-12-13 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5314

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

Fix rmlink.sh

Exclude directories with symlinks which are under version control from
link cleanup script.

Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2
---
M rmlinks.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/14/5314/3

diff --git a/rmlinks.sh b/rmlinks.sh
index 58ca6f3..2b356a5 100755
--- a/rmlinks.sh
+++ b/rmlinks.sh
@@ -1,2 +1,2 @@
 #!/bin/sh
-find . -type l -exec rm \{\} \;
+find . -type l -not -path "./bin/*" -not -path "./M3UA_CNL113537/*" -not -path 
"./SCCP_CNL113341/*" -exec rm \{\} \;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 


[PATCH] osmo-ttcn3-hacks[master]: GPRS/Gb: use generic linker

2017-12-13 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5316

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

GPRS/Gb: use generic linker

Make symlinks using generic.sh functions.

Change-Id: I713b8dffe298e3e878a4760a82f1ad0d42e0aacf
---
A gprs_gb/.gitignore
M gprs_gb/gen_links.sh
2 files changed, 106 insertions(+), 31 deletions(-)


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

diff --git a/gprs_gb/.gitignore b/gprs_gb/.gitignore
new file mode 100644
index 000..3c00bbe
--- /dev/null
+++ b/gprs_gb/.gitignore
@@ -0,0 +1,100 @@
+# Add files to be ignored manually in here:
+BSSGP_Emulation.cc
+BSSGP_Emulation.hh
+BSSGP_Helper_Functions.cc
+BSSGP_Helper_Functions.hh
+BSSGP_Types.cc
+BSSGP_Types.hh
+GSM_RR_Types.cc
+GSM_RR_Types.hh
+GSM_Types.cc
+GSM_Types.hh
+General_Types.cc
+General_Types.hh
+IPL4asp_Functions.cc
+IPL4asp_Functions.hh
+IPL4asp_PortType.cc
+IPL4asp_PortType.hh
+IPL4asp_Types.cc
+IPL4asp_Types.hh
+L1CTL_PortType.cc
+L1CTL_PortType.hh
+L1CTL_Types.cc
+L1CTL_Types.hh
+LAPDm_RAW_PT.cc
+LAPDm_RAW_PT.hh
+LAPDm_Types.cc
+LAPDm_Types.hh
+LLC_Types.cc
+LLC_Types.hh
+Makefile
+NS_CodecPort.cc
+NS_CodecPort.hh
+NS_CodecPort_CtrlFunct.cc
+NS_CodecPort_CtrlFunct.hh
+NS_Emulation.cc
+NS_Emulation.hh
+NS_Types.cc
+NS_Types.hh
+Osmocom_Types.cc
+Osmocom_Types.hh
+RLCMAC_CSN1_Types.cc
+RLCMAC_CSN1_Types.hh
+RLCMAC_Types.cc
+RLCMAC_Types.hh
+Socket_API_Definitions.cc
+Socket_API_Definitions.hh
+TCCConversion_Functions.cc
+TCCConversion_Functions.hh
+TCCInterface_Functions.cc
+TCCInterface_Functions.hh
+Test.cc
+Test.hh
+UD_PortType.cc
+UD_PortType.hh
+UD_Types.cc
+UD_Types.hh
+# N. B: the entries below this line updated automatically by gen_links.sh
+TCCInterface_Functions.ttcn
+TCCConversion_Functions.ttcn
+TCCConversion.cc
+TCCInterface.cc
+TCCInterface_ip.h
+IPL4asp_Functions.ttcn
+IPL4asp_PT.cc
+IPL4asp_PT.hh
+IPL4asp_PortType.ttcn
+IPL4asp_Types.ttcn
+IPL4asp_discovery.cc
+IPL4asp_protocol_L234.hh
+Socket_API_Definitions.ttcn
+UD_PT.cc
+UD_PT.hh
+UD_PortType.ttcn
+UD_Types.ttcn
+MobileL3_CC_Types.ttcn
+MobileL3_CommonIE_Types.ttcn
+MobileL3_GMM_SM_Types.ttcn
+MobileL3_MM_Types.ttcn
+MobileL3_RRM_Types.ttcn
+MobileL3_SMS_Types.ttcn
+MobileL3_SS_Types.ttcn
+MobileL3_Types.ttcn
+SS_DataTypes.asn
+SS_EncDec.cc
+SS_Errors.asn
+SS_Operations.asn
+SS_PDU_Defs.asn
+SS_Protocol.asn
+SS_Types.ttcn
+General_Types.ttcn
+GSM_Types.ttcn
+GSM_RR_Types.ttcn
+Osmocom_Types.ttcn
+RLCMAC_Types.ttcn
+RLCMAC_CSN1_Types.ttcn
+RLCMAC_EncDec.cc
+L1CTL_Types.ttcn
+L1CTL_PortType.ttcn
+LAPDm_RAW_PT.ttcn
+LAPDm_Types.ttcn
diff --git a/gprs_gb/gen_links.sh b/gprs_gb/gen_links.sh
index 9f4cea4..9a6f3e3 100755
--- a/gprs_gb/gen_links.sh
+++ b/gprs_gb/gen_links.sh
@@ -2,35 +2,10 @@
 
 BASEDIR=../deps
 
-gen_links() {
-   DIR=$1
-   FILES=$*
-   for f in $FILES; do
-   echo "Linking $f"
-   ln -sf $DIR/$f $f
-   done
-}
+. ../generic.sh
 
-#DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src
-#FILES="UD_PT.cc  UD_PT.hh  UD_PortType.ttcn  UD_Types.ttcn"
-#gen_links $DIR $FILES
-
-DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
-FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn 
TCCConversion.cc TCCConversion.hh TCCInterface.cc TCCInterface_ip.h"
-gen_links $DIR $FILES
-
-DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src
-FILES="Socket_API_Definitions.ttcn"
-gen_links $DIR $FILES
-
-DIR=$BASEDIR/titan.TestPorts.IPL4asp/src
-FILES="IPL4asp_Functions.ttcn  IPL4asp_PT.cc  IPL4asp_PT.hh 
IPL4asp_PortType.ttcn  IPL4asp_Types.ttcn  IPL4asp_discovery.cc 
IPL4asp_protocol_L234.hh"
-gen_links $DIR $FILES
-
-DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src
-FILES="UD_PT.cc  UD_PT.hh  UD_PortType.ttcn  UD_Types.ttcn"
-gen_links $DIR $FILES
-
-DIR=../library
-FILES="General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn 
RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn 
L1CTL_PortType.ttcn LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn"
-gen_links $DIR $FILES
+link_UNIX_DOMAIN_SOCKETasp $BASEDIR
+link_TCCUsefulFunctions $BASEDIR
+link_SocketAPI $BASEDIR
+link_IPL4asp $BASEDIR
+link_library

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I713b8dffe298e3e878a4760a82f1ad0d42e0aacf
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-ttcn3-hacks[master]: Fix rmlink.sh

2017-12-13 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5314

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

Fix rmlink.sh

Exclude directories with symlinks which are under version control from
link cleanup script.

Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2
---
M rmlinks.sh
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/rmlinks.sh b/rmlinks.sh
index 58ca6f3..851577d 100755
--- a/rmlinks.sh
+++ b/rmlinks.sh
@@ -1,2 +1,2 @@
 #!/bin/sh
-find . -type l -exec rm \{\} \;
+find . -type l -not -path bin -not -path M3UA_CNL113537 -not -path 
SCCP_CNL113341 -exec rm \{\} \;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 


[PATCH] osmo-ttcn3-hacks[master]: GPRS/Gb: use generic linker

2017-12-13 Thread Max

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

GPRS/Gb: use generic linker

Make symlinks using generic.sh functions.

Change-Id: I713b8dffe298e3e878a4760a82f1ad0d42e0aacf
---
A gprs_gb/.gitignore
M gprs_gb/gen_links.sh
2 files changed, 107 insertions(+), 31 deletions(-)


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

diff --git a/gprs_gb/.gitignore b/gprs_gb/.gitignore
new file mode 100644
index 000..3c00bbe
--- /dev/null
+++ b/gprs_gb/.gitignore
@@ -0,0 +1,100 @@
+# Add files to be ignored manually in here:
+BSSGP_Emulation.cc
+BSSGP_Emulation.hh
+BSSGP_Helper_Functions.cc
+BSSGP_Helper_Functions.hh
+BSSGP_Types.cc
+BSSGP_Types.hh
+GSM_RR_Types.cc
+GSM_RR_Types.hh
+GSM_Types.cc
+GSM_Types.hh
+General_Types.cc
+General_Types.hh
+IPL4asp_Functions.cc
+IPL4asp_Functions.hh
+IPL4asp_PortType.cc
+IPL4asp_PortType.hh
+IPL4asp_Types.cc
+IPL4asp_Types.hh
+L1CTL_PortType.cc
+L1CTL_PortType.hh
+L1CTL_Types.cc
+L1CTL_Types.hh
+LAPDm_RAW_PT.cc
+LAPDm_RAW_PT.hh
+LAPDm_Types.cc
+LAPDm_Types.hh
+LLC_Types.cc
+LLC_Types.hh
+Makefile
+NS_CodecPort.cc
+NS_CodecPort.hh
+NS_CodecPort_CtrlFunct.cc
+NS_CodecPort_CtrlFunct.hh
+NS_Emulation.cc
+NS_Emulation.hh
+NS_Types.cc
+NS_Types.hh
+Osmocom_Types.cc
+Osmocom_Types.hh
+RLCMAC_CSN1_Types.cc
+RLCMAC_CSN1_Types.hh
+RLCMAC_Types.cc
+RLCMAC_Types.hh
+Socket_API_Definitions.cc
+Socket_API_Definitions.hh
+TCCConversion_Functions.cc
+TCCConversion_Functions.hh
+TCCInterface_Functions.cc
+TCCInterface_Functions.hh
+Test.cc
+Test.hh
+UD_PortType.cc
+UD_PortType.hh
+UD_Types.cc
+UD_Types.hh
+# N. B: the entries below this line updated automatically by gen_links.sh
+TCCInterface_Functions.ttcn
+TCCConversion_Functions.ttcn
+TCCConversion.cc
+TCCInterface.cc
+TCCInterface_ip.h
+IPL4asp_Functions.ttcn
+IPL4asp_PT.cc
+IPL4asp_PT.hh
+IPL4asp_PortType.ttcn
+IPL4asp_Types.ttcn
+IPL4asp_discovery.cc
+IPL4asp_protocol_L234.hh
+Socket_API_Definitions.ttcn
+UD_PT.cc
+UD_PT.hh
+UD_PortType.ttcn
+UD_Types.ttcn
+MobileL3_CC_Types.ttcn
+MobileL3_CommonIE_Types.ttcn
+MobileL3_GMM_SM_Types.ttcn
+MobileL3_MM_Types.ttcn
+MobileL3_RRM_Types.ttcn
+MobileL3_SMS_Types.ttcn
+MobileL3_SS_Types.ttcn
+MobileL3_Types.ttcn
+SS_DataTypes.asn
+SS_EncDec.cc
+SS_Errors.asn
+SS_Operations.asn
+SS_PDU_Defs.asn
+SS_Protocol.asn
+SS_Types.ttcn
+General_Types.ttcn
+GSM_Types.ttcn
+GSM_RR_Types.ttcn
+Osmocom_Types.ttcn
+RLCMAC_Types.ttcn
+RLCMAC_CSN1_Types.ttcn
+RLCMAC_EncDec.cc
+L1CTL_Types.ttcn
+L1CTL_PortType.ttcn
+LAPDm_RAW_PT.ttcn
+LAPDm_Types.ttcn
diff --git a/gprs_gb/gen_links.sh b/gprs_gb/gen_links.sh
index 9f4cea4..e1291ac 100755
--- a/gprs_gb/gen_links.sh
+++ b/gprs_gb/gen_links.sh
@@ -2,35 +2,11 @@
 
 BASEDIR=../deps
 
-gen_links() {
-   DIR=$1
-   FILES=$*
-   for f in $FILES; do
-   echo "Linking $f"
-   ln -sf $DIR/$f $f
-   done
-}
+. ../generic.sh
 
-#DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src
-#FILES="UD_PT.cc  UD_PT.hh  UD_PortType.ttcn  UD_Types.ttcn"
-#gen_links $DIR $FILES
-
-DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
-FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn 
TCCConversion.cc TCCConversion.hh TCCInterface.cc TCCInterface_ip.h"
-gen_links $DIR $FILES
-
-DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src
-FILES="Socket_API_Definitions.ttcn"
-gen_links $DIR $FILES
-
-DIR=$BASEDIR/titan.TestPorts.IPL4asp/src
-FILES="IPL4asp_Functions.ttcn  IPL4asp_PT.cc  IPL4asp_PT.hh 
IPL4asp_PortType.ttcn  IPL4asp_Types.ttcn  IPL4asp_discovery.cc 
IPL4asp_protocol_L234.hh"
-gen_links $DIR $FILES
-
-DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src
-FILES="UD_PT.cc  UD_PT.hh  UD_PortType.ttcn  UD_Types.ttcn"
-gen_links $DIR $FILES
-
-DIR=../library
-FILES="General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn 
RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc L1CTL_Types.ttcn 
L1CTL_PortType.ttcn LAPDm_RAW_PT.ttcn LAPDm_Types.ttcn"
-gen_links $DIR $FILES
+link_TCCUsefulFunctions $BASEDIR
+link_IPL4asp $BASEDIR
+link_SocketAPI $BASEDIR
+link_UNIX_DOMAIN_SOCKETasp $BASEDIR
+link_MobileL3_v13 $BASEDIR
+link_library

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I713b8dffe298e3e878a4760a82f1ad0d42e0aacf
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-ttcn3-hacks[master]: Add generic link functions

2017-12-13 Thread Max

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

Add generic link functions

* add function for link generation
* add functions to symlink specific libraries

The main differences with existing gen_links() routines:
* properly shift arguments to avoid making directory symlink alongside
  with files symlink
* additional debug output
* automated generation of .gitignore entries for linked files

Change-Id: I2aaab05ebe19e5f18c03806069197be0e1304a0b
---
A generic.sh
1 file changed, 50 insertions(+), 0 deletions(-)


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

diff --git a/generic.sh b/generic.sh
new file mode 100644
index 000..c084602
--- /dev/null
+++ b/generic.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Generic function for properly linking necessary dependencies
+# and several examples of linking particular libraries which use it.
+# To avoid cluttering git status, the per-test .gitignore is updated 
automatically
+# If additional files are required from particular library than manual 
adjustements
+# might be necessary
+
+set -e
+
+gen_links() {
+DIR=$1
+shift
+FILES=$*
+echo "Files to link from $DIR:"
+echo $FILES
+echo ""
+for f in $FILES; do
+   echo "Linking $f"
+   ln -sf $DIR/$f $f
+   echo "$f" >> .gitignore
+done
+echo "Linking done, cleaning up .gitignore..."
+awk '!seen[$0]++' .gitignore > tmp.gitignore
+mv tmp.gitignore .gitignore
+}
+
+link_TCCUsefulFunctions() {
+gen_links $1/titan.Libraries.TCCUsefulFunctions/src 
"TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc 
TCCInterface.cc TCCInterface_ip.h"
+}
+
+link_IPL4asp() {
+gen_links $1/titan.TestPorts.IPL4asp/src "IPL4asp_Functions.ttcn 
IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn 
IPL4asp_discovery.cc IPL4asp_protocol_L234.hh"
+}
+
+link_SocketAPI() {
+gen_links $1/titan.TestPorts.Common_Components.Socket-API/src 
"Socket_API_Definitions.ttcn"
+}
+
+link_UNIX_DOMAIN_SOCKETasp() {
+gen_links $1/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src "UD_PT.cc UD_PT.hh 
UD_PortType.ttcn UD_Types.ttcn"
+}
+
+link_MobileL3_v13() {
+gen_links $1/titan.ProtocolModules.MobileL3_v13.4.0/src 
"MobileL3_CC_Types.ttcn MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types.ttcn 
MobileL3_MM_Types.ttcn MobileL3_RRM_Types.ttcn MobileL3_SMS_Types.ttcn 
MobileL3_SS_Types.ttcn MobileL3_Types.ttcn SS_DataTypes.asn SS_EncDec.cc 
SS_Errors.asn SS_Operations.asn SS_PDU_Defs.asn SS_Protocol.asn SS_Types.ttcn"
+}
+
+link_library() {
+gen_links "../library" "General_Types.ttcn GSM_Types.ttcn 
GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Types.ttcn 
RLCMAC_EncDec.cc L1CTL_Types.ttcn L1CTL_PortType.ttcn LAPDm_RAW_PT.ttcn 
LAPDm_Types.ttcn"
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2aaab05ebe19e5f18c03806069197be0e1304a0b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 


[PATCH] osmo-ttcn3-hacks[master]: Fix rmlink.sh

2017-12-13 Thread Max

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

Fix rmlink.sh

Exclude directories with symlinks which are under version control from
link cleanup script.

Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2
---
M rmlinks.sh
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/rmlinks.sh b/rmlinks.sh
index 58ca6f3..b26fbc9 100755
--- a/rmlinks.sh
+++ b/rmlinks.sh
@@ -1,2 +1,2 @@
 #!/bin/sh
-find . -type l -exec rm \{\} \;
+find . -type l \( -path bin -o -path M3UA_CNL113537 -o -path SCCP_CNL113341 \) 
-prune -exec rm \{\} \;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b93b3918f6d277a21cd30e7dcf91cf4adcc69f2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max 


[MERGED] osmocom-bb[master]: mobile/gsm48_rr.c: cosmetic: drop wrong comment

2017-12-13 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged.

Change subject: mobile/gsm48_rr.c: cosmetic: drop wrong comment
..


mobile/gsm48_rr.c: cosmetic: drop wrong comment

Nothing is actually being skipped in this function.

Change-Id: I9d5a33cf3a1dd7a75f9769d3c5ba85c59594b8f4
---
M src/host/layer23/src/mobile/gsm48_rr.c
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/src/host/layer23/src/mobile/gsm48_rr.c 
b/src/host/layer23/src/mobile/gsm48_rr.c
index 403e32d..f4b9500 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -1911,7 +1911,6 @@
 /* receive "SYSTEM INFORMATION 4" message (9.1.36) */
 static int gsm48_rr_rx_sysinfo4(struct osmocom_ms *ms, struct msgb *msg)
 {
-   /* NOTE: pseudo length is not in this structure, so we skip */
struct gsm48_system_information_type_4 *si = msgb_l3(msg);
struct gsm48_sysinfo *s = ms->cellsel.si;
int payload_len = msgb_l3len(msg) - sizeof(*si);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d5a33cf3a1dd7a75f9769d3c5ba85c59594b8f4
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Vadim Yanitskiy 


osmocom-bb[master]: mobile/gsm48_rr.c: fix ACCH System Information parsing

2017-12-13 Thread Harald Welte

Patch Set 2: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5
Gerrit-PatchSet: 2
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-HasComments: No


[MERGED] osmocom-bb[master]: mobile/gsm48_rr.c: fix ACCH System Information parsing

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: mobile/gsm48_rr.c: fix ACCH System Information parsing
..


mobile/gsm48_rr.c: fix ACCH System Information parsing

According to GSM 04.08, the System Information messages, such as
SI5, SI5ter, SI5bis and SI6 (described in sections 9.1.37-40),
have no the 'L2 Pseudo Length' (10.5.2.19) field, unlike others.

So, previously the ACCH SI messages were ignored due to an
implementation error - the gsm48_system_information_type_header
struct isn't applicable here, because it assumes the 'l2_plen'.

Since there is no (yet?) equivalent struct for the ACCH SI, this
change replaces the wrong struct by the 'gsm48_hdr', which
satisfies described requirements.

Moreover, this change cleans up some gsm48_rr_rx_sysinfo*
functions, getting rid of meaningless pionter shifting.

Change-Id: I9166996f146af7973bf02a8a1c965581dc58a4a5
---
M src/host/layer23/src/mobile/gsm48_rr.c
1 file changed, 11 insertions(+), 15 deletions(-)

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



diff --git a/src/host/layer23/src/mobile/gsm48_rr.c 
b/src/host/layer23/src/mobile/gsm48_rr.c
index ac27214..403e32d 100644
--- a/src/host/layer23/src/mobile/gsm48_rr.c
+++ b/src/host/layer23/src/mobile/gsm48_rr.c
@@ -1943,10 +1943,9 @@
 /* receive "SYSTEM INFORMATION 5" message (9.1.37) */
 static int gsm48_rr_rx_sysinfo5(struct osmocom_ms *ms, struct msgb *msg)
 {
-   /* NOTE: pseudo length is not in this structure, so we skip */
-   struct gsm48_system_information_type_5 *si = msgb_l3(msg) + 1;
+   struct gsm48_system_information_type_5 *si = msgb_l3(msg);
struct gsm48_sysinfo *s = ms->cellsel.si;
-   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;
+   int payload_len = msgb_l3len(msg) - sizeof(*si);
 
if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5 "
@@ -1973,10 +1972,9 @@
 /* receive "SYSTEM INFORMATION 5bis" message (9.1.38) */
 static int gsm48_rr_rx_sysinfo5bis(struct osmocom_ms *ms, struct msgb *msg)
 {
-   /* NOTE: pseudo length is not in this structure, so we skip */
-   struct gsm48_system_information_type_5bis *si = msgb_l3(msg) + 1;
+   struct gsm48_system_information_type_5bis *si = msgb_l3(msg);
struct gsm48_sysinfo *s = ms->cellsel.si;
-   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;
+   int payload_len = msgb_l3len(msg) - sizeof(*si);
 
if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5bis"
@@ -2004,10 +2002,9 @@
 /* receive "SYSTEM INFORMATION 5ter" message (9.1.39) */
 static int gsm48_rr_rx_sysinfo5ter(struct osmocom_ms *ms, struct msgb *msg)
 {
-   /* NOTE: pseudo length is not in this structure, so we skip */
-   struct gsm48_system_information_type_5ter *si = msgb_l3(msg) + 1;
+   struct gsm48_system_information_type_5ter *si = msgb_l3(msg);
struct gsm48_sysinfo *s = ms->cellsel.si;
-   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;
+   int payload_len = msgb_l3len(msg) - sizeof(*si);
 
if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 5ter"
@@ -2035,11 +2032,10 @@
 /* receive "SYSTEM INFORMATION 6" message (9.1.39) */
 static int gsm48_rr_rx_sysinfo6(struct osmocom_ms *ms, struct msgb *msg)
 {
-   /* NOTE: pseudo length is not in this structure, so we skip */
-   struct gsm48_system_information_type_6 *si = msgb_l3(msg) + 1;
+   struct gsm48_system_information_type_6 *si = msgb_l3(msg);
struct gsm48_sysinfo *s = ms->cellsel.si;
struct rx_meas_stat *meas = >meas;
-   int payload_len = msgb_l3len(msg) - sizeof(*si) - 1;
+   int payload_len = msgb_l3len(msg) - sizeof(*si);
 
if (!s) {
LOGP(DRR, LOGL_INFO, "No cell selected, SYSTEM INFORMATION 6 "
@@ -4748,7 +4744,7 @@
struct gsm48_rrlayer *rr = >rrlayer;
struct gsm_settings *set = >settings;
struct abis_rsl_rll_hdr *rllh = msgb_l2(msg);
-   struct gsm48_system_information_type_header *sih = msgb_l3(msg);
+   struct gsm48_hdr *sih = msgb_l3(msg);
uint8_t ind_ta, ind_tx_power;
 
if (msgb_l2len(msg) < sizeof(*rllh) + 2 + 2) {
@@ -4772,7 +4768,7 @@
rr->cd_now.ind_tx_power = ind_tx_power;
}
 
-   switch (sih->system_information) {
+   switch (sih->msg_type) {
case GSM48_MT_RR_SYSINFO_5:
return gsm48_rr_rx_sysinfo5(ms, msg);
case GSM48_MT_RR_SYSINFO_5bis:
@@ -4783,7 +4779,7 @@
return gsm48_rr_rx_sysinfo6(ms, msg);
default:
LOGP(DRR, LOGL_NOTICE, "ACCH message type 0x%02x unknown.\n",
-   sih->system_information);
+   sih->msg_type);
return -EINVAL;
}
 }

-- 
To view, visit https://gerrit.osmocom.org/5204
To 

osmo-gsm-tester[master]: suites: Wait for BTS to connect to BSC before continuing

2017-12-13 Thread Harald Welte

Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/5276/2/suites/voice/mo_mt_call.py
File suites/voice/mo_mt_call.py:

Line 26: hlr.subscriber_add(ms_mo)
you can probably add the subscribers to the HLR before/while waiting for the 
BTS to be connected.  There's no dependency between those.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-gsm-tester[master]: OsmoBsc: Introduce bts_is_connected API

2017-12-13 Thread Harald Welte

Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


osmo-gsm-tester[master]: OsmoNitb: Introduce bts_is_connected API

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] osmo-ci[master]: rewrite osmocom-nightly-package based on the old osmocom-nig...

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: rewrite osmocom-nightly-package based on the old 
osmocom-nightly-split.sh
..


rewrite osmocom-nightly-package based on the old osmocom-nightly-split.sh

The split build script also initilize the repository if it's empty and doesn't
need any state of the osc repository.

It also downloads bumpversion and limesuite

Change-Id: I3b55e14b5b4915a3aae23ee382d65bce4ef82774
---
M scripts/osmocom-nightly-packages.sh
1 file changed, 164 insertions(+), 69 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/scripts/osmocom-nightly-packages.sh 
b/scripts/osmocom-nightly-packages.sh
index c2b603b..8db2d57 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -1,84 +1,179 @@
-#!/bin/sh
-
+#!/bin/bash
 # requirements
 # apt install devscripts git-buildpackage osc git
 
-# rather than including a dangerous 'rm -rf *' here, lets delegate to the user:
-if [ -n "$(ls)" ]; then
-  echo "ERROR: I need to run in an empty directory."
-  exit 1
-fi
+set -e
+set -x
 
 if ! which osc >/dev/null 2>/dev/null ; then
   echo "osc binary not found"
   exit 1
 fi
-
-set -x -e
-
-git clone git://git.osmocom.org/osmo-sip-connector
-git clone git://git.osmocom.org/libosmocore
-git clone git://git.osmocom.org/libosmo-sccp
-git clone git://git.osmocom.org/libosmo-abis
-git clone git://git.osmocom.org/libosmo-netif
-git clone git://git.osmocom.org/libsmpp34
-git clone git://git.osmocom.org/libasn1c
-git clone git://git.osmocom.org/libgtpnl
-git clone git://git.osmocom.org/osmo-iuh
-git clone git://git.osmocom.org/osmo-sgsn
-git clone git://git.osmocom.org/osmo-ggsn
-git clone git://git.osmocom.org/openbsc
-git clone git://git.osmocom.org/osmo-pcap
-git clone git://git.osmocom.org/osmo-trx
-git clone git://git.osmocom.org/osmo-bts
-git clone git://git.osmocom.org/osmo-pcu
-git clone git://git.osmocom.org/osmo-hlr
-git clone git://git.osmocom.org/osmo-mgw
-git clone git://git.osmocom.org/osmo-msc
-git clone git://git.osmocom.org/osmo-bsc
-
-
+DT=$(date +%Y%m%d)
 PROJ=network:osmocom:nightly
-osc co $PROJ
 
-DT=`date +%Y%m%d`
+### common
+checkout() {
+  local name=$1
+  local branch=$2
+  local url="git://git.osmocom.org"
 
+  cd "$REPO"
 
-build() {
-  rm -rf data
-  cd $1
-  VER=`head -1 debian/changelog | cut -d ' ' -f 2 | sed s,"(","",  | sed 
s,")","",`
-  dch -v $VER.$DT -m "Snapshot build"
-  git commit -m "$DT snapshot" debian/
-  gbp buildpackage -S -uc -us --git-export-dir=$PWD/../data
-  cd ../$PROJ/$1
-  osc rm * || true
-  mv ../../data/*.dsc .
-  mv ../../data/*.tar* .
-  osc add *
-  cd ../../
+  if [ -n "$branch" ] ; then
+git clone "$url/$name" -b "$branch"
+  else
+git clone "$url/$name"
+  fi
+
+  cd -
 }
 
-build libosmocore
-build libosmo-sccp
-build libosmo-abis
-build libosmo-netif
-build libsmpp34
-build libasn1c
-build libgtpnl
-build osmo-iuh
-build osmo-ggsn
-build osmo-sgsn
-build openbsc
-build osmo-pcap
-build osmo-trx
-build osmo-sip-connector
-build osmo-bts
-build osmo-pcu
-build osmo-hlr
-build osmo-mgw
-build osmo-msc
-build osmo-bsc
+### OBS build
+prepare() {
+  # clean up the whole space
+  mkdir -p "$REPO/osc/"
+  cd "$REPO/osc"
+  osc co "$PROJ"
+}
 
-cd $PROJ
-osc ci -m "Snapshot $DT"
+build() {
+  local name=$1
+  local changelog=$2
+  local gitbpargs=$3
+  local repodir=$REPO/$name
+  local oscdir=$REPO/osc/$PROJ/$name
+
+  if [ -z "$changelog" ] ; then
+changelog=commit
+  fi
+
+  if [ -d "$oscdir" ] ; then
+# remove earlier version
+cd "$oscdir"
+osc rm -- * || true
+  else
+# new package
+mkdir -p "$oscdir/"
+cd "$REPO/osc/$PROJ/"
+osc add "$name"
+  fi
+
+  cd "$repodir"
+
+  if [ "$changelog" = "commit" ] ; then
+VER=$(head -1 debian/changelog | cut -d ' ' -f 2 | sed 's,(,,'  | sed 
's,),,')
+dch -v "$VER.$DT" -m "Snapshot build"
+git commit -m "$DT snapshot" debian/
+  fi
+
+  mkdir -p "$DATA/$name"
+  # source code build without dependency checks and unsigned source and 
unsigned change log
+  gbp buildpackage -S -uc -us -d --git-ignore-branch 
"--git-export-dir=$DATA/$name" $gitbpargs
+
+  mv "$DATA/$name/"*.tar* "$DATA/$name/"*.dsc "$oscdir/"
+
+  cd "$oscdir"
+  osc add -- *.tar* *.dsc
+  osc ci -m "Snapshot $name $DT"
+}
+
+post() {
+  cd "$REPO/osc/$PROJ/"
+  osc status
+}
+
+download_bumpversion() {
+  # bumpversion is required for debian < 9/stretch
+  local oscdir=$REPO/osc/$PROJ/bumpversion
+  local version=0.5.3
+  local release=3
+
+  if [ ! -d "$oscdir" ] ; then
+mkdir "$oscdir"
+cd "$oscdir"
+wget 
"http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version-$release.dsc;
+wget 
"http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version.orig.tar.gz;
+wget 
"http://http.debian.net/debian/pool/main/b/bumpversion/bumpversion_$version-$release.debian.tar.xz;
+  

osmo-ci[master]: rewrite osmocom-nightly-package based on the old osmocom-nig...

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2 Verified+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3b55e14b5b4915a3aae23ee382d65bce4ef82774
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


osmo-ttcn3-hacks[master]: Add git-review config

2017-12-13 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-ttcn3-hacks[master]: Add git-review config

2017-12-13 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Add git-review config
..


Add git-review config

Change-Id: Ie8ea609827ae4da6659b64c25f0c743770e0cc07
---
A .gitreview
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..ffc7ed4
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,3 @@
+[gerrit]
+host=gerrit.osmocom.org
+project=osmo-ttcn3-hacks

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

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


[PATCH] osmo-ttcn3-hacks[master]: Add git-review config

2017-12-13 Thread Max

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

Add git-review config

Change-Id: Ie8ea609827ae4da6659b64c25f0c743770e0cc07
---
A .gitreview
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..ffc7ed4
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,3 @@
+[gerrit]
+host=gerrit.osmocom.org
+project=osmo-ttcn3-hacks

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8ea609827ae4da6659b64c25f0c743770e0cc07
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Max