Build failed in Jenkins: master-simtrace2 » a1=default,a2=default,a3=default,osmocom-master-debian9 #205

2018-11-29 Thread jenkins
See 


--
[...truncated 168.16 KB...]
  8   0   0   8   8 obj/owhw/dfu_boardver_adc.o
 30  16   0  46  2e obj/owhw/dfu_manifest.o
239   0   0 239  ef obj/owhw/dfu_owhw.o
   1472   1   01473 5c1 obj/owhw/dfu_main.o
244   0   0 244  f4 obj/owhw/dfu_dfu.o
645   4   6 655 28f obj/owhw/dfu_dfu_runtime.o
   3490   0 2083698 e72 obj/owhw/dfu_card_emu.o
  0   0   0   0   0 obj/owhw/dfu_cciddriver.o
   2629  12   42645 a55 obj/owhw/dfu_iso7816_4.o
 96   0   0  96  60 obj/owhw/dfu_iso7816_fidi.o
  0   0   0   0   0 obj/owhw/dfu_mitm.o
   23081152   03460 d84 obj/owhw/dfu_mode_cardemu.o
  0   0   0   0   0 obj/owhw/dfu_mode_ccid.o
352   0 520 872 368 obj/owhw/dfu_simtrace_iso7816.o
  0   0   0   0   0 obj/owhw/dfu_sniffer.o
488  40   0 528 210 obj/owhw/dfu_tc_etu.o
597  48   0 645 285 obj/owhw/dfu_usb.o
  26024   0   17988   44012abec bin/owhw-cardem-dfu.elf
=== owhw / cardem RES:0 ==

=== FIRMWARE TESTS ===
cc -g -Wall `pkg-config --cflags libosmocore` -I../src_simtrace 
-I../atmel_softpack_libraries/libchip_sam3s 
-I../atmel_softpack_libraries/libchip_sam3s/cmsis 
-I../atmel_softpack_libraries/libchip_sam3s/include 
-I../atmel_softpack_libraries/usb/include -I../libcommon/include 
-I../libboard/common/include -I../libboard/simtrace/include -I. -o 
card_emu_tests.hobj -c card_emu_tests.c
In file included from ../libboard/common/include/board_common.h:24:0,
 from ../libboard/simtrace/include/board.h:21,
 from 
../atmel_softpack_libraries/libchip_sam3s/include/trace.h:70,
 from ../libcommon/include/assert.h:60,
 from card_emu_tests.c:4:
../atmel_softpack_libraries/libchip_sam3s/chip.h:11:6: warning: #warning 
Library does not support the specified chip, specifying sam3s4. [-Wcpp]
 #warning Library does not support the specified chip, specifying sam3s4.
  ^~~
card_emu_tests.c: In function ‘get_and_verify_rctx’:
card_emu_tests.c:171:34: warning: unused variable ‘td’ [-Wunused-variable]
  struct cardemu_usb_msg_tx_data *td;
  ^~
cc -g -Wall `pkg-config --cflags libosmocore` -I../src_simtrace 
-I../atmel_softpack_libraries/libchip_sam3s 
-I../atmel_softpack_libraries/libchip_sam3s/cmsis 
-I../atmel_softpack_libraries/libchip_sam3s/include 
-I../atmel_softpack_libraries/usb/include -I../libcommon/include 
-I../libboard/common/include -I../libboard/simtrace/include -I. -o 
card_emu.hobj -c ../libcommon/source/card_emu.c
In file included from ../libboard/common/include/board_common.h:24:0,
 from ../libboard/simtrace/include/board.h:21,
 from 
../atmel_softpack_libraries/libchip_sam3s/include/trace.h:70,
 from ../libcommon/include/assert.h:60,
 from ../libcommon/source/card_emu.c:21:
../atmel_softpack_libraries/libchip_sam3s/chip.h:11:6: warning: #warning 
Library does not support the specified chip, specifying sam3s4. [-Wcpp]
 #warning Library does not support the specified chip, specifying sam3s4.
  ^~~
In file included from ../libcommon/source/card_emu.c:27:0:
../libcommon/include/utils.h:31:2: warning: #warning 
"local_irq_{save,restore}() not implemented" [-Wcpp]
 #warning "local_irq_{save,restore}() not implemented"
  ^~~
../libcommon/source/card_emu.c: In function ‘flush_rx_buffer’:
../libcommon/source/card_emu.c:279:11: warning: unused variable ‘data_len’ 
[-Wunused-variable]
  uint32_t data_len;
   ^~~~
cc -g -Wall `pkg-config --cflags libosmocore` -I../src_simtrace 
-I../atmel_softpack_libraries/libchip_sam3s 
-I../atmel_softpack_libraries/libchip_sam3s/cmsis 
-I../atmel_softpack_libraries/libchip_sam3s/include 
-I../atmel_softpack_libraries/usb/include -I../libcommon/include 
-I../libboard/common/include -I../libboard/simtrace/include -I. -o usb_buf.hobj 
-c ../libcommon/source/usb_buf.c
In file included from ../libboard/common/include/board_common.h:24:0,
 from ../libboard/simtrace/include/board.h:21,
 from ../libcommon/source/usb_buf.c:17:
../atmel_softpack_libraries/libchip_sam3s/chip.h:11:6: warning: #warning 
Library does not support the specified chip, specifying sam3s4. [-Wcpp]
 #warning Library does not support the specified chip, specifying sam3s4.
  ^~~
cc -g -Wall `pkg-config --cflags libosmocore` -I../src_simtrace 
-I../atmel_softpack_libraries/libchip_sam3s 
-I../atmel_softpack_libraries/libchip_sam3s/cmsis 

Change in osmo-msc[master]: drop unused gsm_network->handover.active

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12014

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

Change subject: drop unused gsm_network->handover.active
..

drop unused gsm_network->handover.active

gsm_network contains an int handover.active which is always zero. Drop it.

There is real handover code coming up soon, one part of this is to avoid
confusion.

The internal MNCC code queried it to decide whether to MNCC_BRIDGE or proxy RTP
(MNCC_FRAME_RECV). Since RTP is being handled by osmo-mgw since forever, drop
that entire condition from mncc_builtin.

Change-Id: Ie16e718266882588b38297121364ca0b7fdfe948
---
M include/osmocom/msc/gsm_data.h
M src/libmsc/mncc_builtin.c
2 files changed, 2 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/14/12014/3
--
To view, visit https://gerrit.osmocom.org/12014
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie16e718266882588b38297121364ca0b7fdfe948
Gerrit-Change-Number: 12014
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: rename some RAN conn related stuff to ran_conn_*

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12030

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

Change subject: rename some RAN conn related stuff to ran_conn_*
..

rename some RAN conn related stuff to ran_conn_*

Following previous rename of gsm_subscriber_connection:

Some functions and #defines are still called like "msc_conn" or just "msc_",
while they are clearly about a RAN conn.

To avoid confusion with the future separate concepts of MSC roles and a RAN
connection, rename all those to match the common "ran_conn" prefix.

Change-Id: Ia17a0a35f11911e00e19cafb5d7828d729a69640
---
M include/osmocom/msc/osmo_msc.h
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_09_11.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/osmo_msc.c
M src/libmsc/silent_call.c
M src/libmsc/subscr_conn.c
M src/libmsc/transaction.c
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_tests.c
15 files changed, 104 insertions(+), 109 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/30/12030/4
--
To view, visit https://gerrit.osmocom.org/12030
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia17a0a35f11911e00e19cafb5d7828d729a69640
Gerrit-Change-Number: 12030
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: rename gsm_encr to geran_encr, it is only applicable on GERAN

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12039

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

Change subject: rename gsm_encr to geran_encr, it is only applicable on GERAN
..

rename gsm_encr to geran_encr, it is only applicable on GERAN

On UTRAN, Security Mode is used instead of Ciphering Command, which does not
feature an A5 algorithm id.

Change-Id: Idc7ca9da1aa13ae16f5db2cb1024676cbc770820
---
M include/osmocom/msc/common_cs.h
M include/osmocom/msc/gsm_data.h
M src/libmsc/gsm_04_08.c
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/39/12039/2
--
To view, visit https://gerrit.osmocom.org/12039
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc7ca9da1aa13ae16f5db2cb1024676cbc770820
Gerrit-Change-Number: 12039
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: move subscr_conn.c to ran_conn.c

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12031

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

Change subject: move subscr_conn.c to ran_conn.c
..

move subscr_conn.c to ran_conn.c

subscr_conn.c exclusively defines ran_conn related things. Rename the file.

Change-Id: I6aa6b335842116c717a554c981083a914724ee21
---
M src/libmsc/Makefile.am
R src/libmsc/ran_conn.c
2 files changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/31/12031/4
--
To view, visit https://gerrit.osmocom.org/12031
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6aa6b335842116c717a554c981083a914724ee21
Gerrit-Change-Number: 12031
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: drop unused gsm_subscr_conn->mncc_rtp_bridge

2018-11-29 Thread Neels Hofmeyr
Hello Vadim Yanitskiy, Jenkins Builder,

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

https://gerrit.osmocom.org/12013

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

Change subject: drop unused gsm_subscr_conn->mncc_rtp_bridge
..

drop unused gsm_subscr_conn->mncc_rtp_bridge

Change-Id: I322dc18cfe2cc573744261df837e719b5cf224ba
---
M include/osmocom/msc/gsm_data.h
M src/libmsc/gsm_04_08_cc.c
2 files changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/13/12013/3
-- 
To view, visit https://gerrit.osmocom.org/12013
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I322dc18cfe2cc573744261df837e719b5cf224ba
Gerrit-Change-Number: 12013
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: populate gsm_subscriber_connection->encr during Ciph

2018-11-29 Thread Neels Hofmeyr
Hello Vadim Yanitskiy, Jenkins Builder,

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

https://gerrit.osmocom.org/12016

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

Change subject: populate gsm_subscriber_connection->encr during Ciph
..

populate gsm_subscriber_connection->encr during Ciph

The gsm_subscriber_connection->encr is never used. Use it.

When sending the Ciphering Mode Command, populate the encryption key.
When receivint the Ciphering Mode Complete, populate the chosen alg_id.

Out of paranoia, store the enc key only if the size is large enough.

Hence the vty_dump_one_conn() now reports the actually chosen A5 algorithm ID
used.

For 3G connections, though, this will still remain 0 in the VTY, since there is
no explicit A5 algorithm negotiated on UTRAN. (Security Mode Command and
Security Mode Complete instead of the GERAN Ciphering.)

Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
---
M src/libmsc/gsm_04_08.c
M src/libmsc/osmo_msc.c
2 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/16/12016/6
--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 6
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: rename gsm_subscriber_connection to ran_conn

2018-11-29 Thread Neels Hofmeyr
Hello Vadim Yanitskiy, Jenkins Builder,

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

https://gerrit.osmocom.org/12015

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

Change subject: rename gsm_subscriber_connection to ran_conn
..

rename gsm_subscriber_connection to ran_conn

In preparation for inter-BSC and inter-MSC handover, we need to separate the
subscriber management logic from the actual RAN connections. What better time
to finally rename gsm_subscriber_connection.

* Name choice:

In 2G, this is a connection to the BSS, but even though 3GPP TS commonly talk
of "BSS-A" and "BSS-B" when explaining handover, it's not good to call it
"bss_conn": in 3G a BSS is called RNS, IIUC.

The overall term for 2G (GERAN) and 3G (UTRAN) is RAN: Radio Access Network.

* Rationale:

A subscriber in the MSC so far has only one RAN connection, but e.g. for
inter-BSC handover, a second one needs to be created to handover to. Most of
the items in the former gsm_subscriber_connection are actually related to the
RAN, with only a few MM and RTP related items. So, as a first step, just rename
it to ran_conn, to cosmetically prepare for moving the not strictly RAN related
items away later.

Also:

- Rename some functions from msc_subscr_conn_* to ran_conn_*
- Rename "Subscr_Conn" FSM instance name to "RAN_conn"
- Rename SUBSCR_CONN_* to RAN_CONN_*

Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
---
M include/osmocom/msc/a_iface.h
M include/osmocom/msc/gsm_04_08.h
M include/osmocom/msc/gsm_04_11.h
M include/osmocom/msc/gsm_04_14.h
M include/osmocom/msc/gsm_04_80.h
M include/osmocom/msc/gsm_09_11.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/iucs.h
M include/osmocom/msc/msc_ifaces.h
M include/osmocom/msc/msc_mgcp.h
M include/osmocom/msc/osmo_msc.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/msc_ifaces.c
M src/libmsc/msc_mgcp.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/subscr_conn.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/osmo-msc/msc_main.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
57 files changed, 3,841 insertions(+), 3,850 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/15/12015/7
--
To view, visit https://gerrit.osmocom.org/12015
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
Gerrit-Change-Number: 12015
Gerrit-PatchSet: 7
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: move ran_conn declarations to new ran_conn.h

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12032

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

Change subject: move ran_conn declarations to new ran_conn.h
..

move ran_conn declarations to new ran_conn.h

With the dawn of inter-BSC,MSC handover, adopting the MSC-A,-I,-T roles from
3GPP TS 49.008, the RAN connection shall soon be a neatly separated corner of
osmo-msc, so gravitate ran_conn decarations to files of matching name.

Also, the current chaos of API defined in files with mismatching/meaningless
names drives me crazy.

Change-Id: Ice31e6c43e46678538c65261f150c67e1d0845e5
---
M include/osmocom/msc/Makefile.am
M include/osmocom/msc/common_cs.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/iucs.h
M include/osmocom/msc/msc_mgcp.h
M include/osmocom/msc/osmo_msc.h
A include/osmocom/msc/ran_conn.h
M include/osmocom/msc/vlr.h
M src/libmsc/ran_conn.c
M src/libmsc/rrlp.c
11 files changed, 252 insertions(+), 244 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/32/12032/4
--
To view, visit https://gerrit.osmocom.org/12032
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ice31e6c43e46678538c65261f150c67e1d0845e5
Gerrit-Change-Number: 12032
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: populate gsm_subscriber_connection->encr during Ciph

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12016 )

Change subject: populate gsm_subscriber_connection->encr during Ciph
..


Patch Set 5:

how is this. I haven't tested properly yet, but can't be worse than before, can 
it.


--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 03:40:05 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: populate gsm_subscriber_connection->encr during Ciph

2018-11-29 Thread Neels Hofmeyr
Hello Vadim Yanitskiy, Jenkins Builder,

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

https://gerrit.osmocom.org/12016

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

Change subject: populate gsm_subscriber_connection->encr during Ciph
..

populate gsm_subscriber_connection->encr during Ciph

The gsm_subscriber_connection->encr is never used. Use it.

When sending the Ciphering Mode Command, populate the encryption key.
When receivint the Ciphering Mode Complete, populate the chosen alg_id.

Hence the vty_dump_one_conn() now reports the actually chosen A5 algorithm ID
used.

For 3G connections, though, this will still remain 0 in the VTY, since there is
no explicit A5 algorithm negotiated on UTRAN. (Security Mode Command and
Security Mode Complete instead of the GERAN Ciphering.)

Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
---
M src/libmsc/gsm_04_08.c
M src/libmsc/osmo_msc.c
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/16/12016/5
--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: move ran_conn declarations to new ran_conn.h

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12032

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

Change subject: move ran_conn declarations to new ran_conn.h
..

move ran_conn declarations to new ran_conn.h

With the dawn of inter-BSC,MSC handover, adopting the MSC-A,-I,-T roles from
3GPP TS 49.008, the RAN connection shall soon be a neatly separated corner of
osmo-msc, so gravitate ran_conn decarations to files of matching name.

Also, the current chaos of API defined in files with mismatching/meaningless
names drives me crazy.

Change-Id: Ice31e6c43e46678538c65261f150c67e1d0845e5
---
M include/osmocom/msc/Makefile.am
M include/osmocom/msc/common_cs.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/msc_mgcp.h
M include/osmocom/msc/osmo_msc.h
A include/osmocom/msc/ran_conn.h
M include/osmocom/msc/vlr.h
M src/libmsc/rrlp.c
9 files changed, 251 insertions(+), 249 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/32/12032/3
--
To view, visit https://gerrit.osmocom.org/12032
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ice31e6c43e46678538c65261f150c67e1d0845e5
Gerrit-Change-Number: 12032
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: rename gsm_encr to geran_encr, it is only applicable on GERAN

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12039


Change subject: rename gsm_encr to geran_encr, it is only applicable on GERAN
..

rename gsm_encr to geran_encr, it is only applicable on GERAN

On UTRAN, Security Mode is used instead of Ciphering Command, which does not
feature an A5 algorithm id.

Change-Id: Idc7ca9da1aa13ae16f5db2cb1024676cbc770820
---
M include/osmocom/msc/common_cs.h
M include/osmocom/msc/gsm_data.h
2 files changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/include/osmocom/msc/common_cs.h b/include/osmocom/msc/common_cs.h
index fddc6ec..410f102 100644
--- a/include/osmocom/msc/common_cs.h
+++ b/include/osmocom/msc/common_cs.h
@@ -9,7 +9,7 @@

 #define MAX_A5_KEY_LEN (128/8)

-struct gsm_encr {
+struct geran_encr {
uint8_t alg_id;
uint8_t key_len;
uint8_t key[MAX_A5_KEY_LEN];
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 94a6ffd..1231327 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -125,7 +125,7 @@
enum ran_type via_ran;

uint16_t lac;
-   struct gsm_encr encr;
+   struct geran_encr encr;

/* "Temporary" storage for the case the VLR asked for Cipher Mode 
Command, but the MSC still
 * wants to request a Classmark Update first. */

--
To view, visit https://gerrit.osmocom.org/12039
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: combine several small .h in msc_common.h

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12033

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

Change subject: combine several small .h in msc_common.h
..

combine several small .h in msc_common.h

For hysterical raisins, there are some header files that contain few
declarations, and where the name doesn't reflect the content. Combine them to
new msc_common.h:

- common.h
- common_cs.h
- debug.h
- osmo_msc.h
=> msc_common.h

Change-Id: I9e3a587342f8d398fb27354a2f2475f8797cdb28
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/common.h
D include/osmocom/msc/common_cs.h
D include/osmocom/msc/debug.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_data_shared.h
A include/osmocom/msc/msc_common.h
D include/osmocom/msc/osmo_msc.h
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/a_reset.c
M src/libmsc/ctrl_commands.c
M src/libmsc/db.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_09_11.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
M src/libmsc/mncc_sock.c
M src/libmsc/msc_ifaces.c
M src/libmsc/msc_mgcp.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M src/libmsc/ran_conn.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.c
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_auth_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/osmo-msc/msc_main.c
M src/utils/smpp_mirror.c
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/smpp/smpp_test.c
M tests/sms_queue/sms_queue_test.c
45 files changed, 52 insertions(+), 115 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/33/12033/3
--
To view, visit https://gerrit.osmocom.org/12033
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9e3a587342f8d398fb27354a2f2475f8797cdb28
Gerrit-Change-Number: 12033
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: drop unused gsm_subscriber_connection->encr

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12016 )

Change subject: drop unused gsm_subscriber_connection->encr
..


Patch Set 4:

duh, it *is* decoded and passed on as argument to msc_cipher_mode_compl(), so 
we just need to *use* it.


--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 03:19:21 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: drop unused gsm_subscriber_connection->encr

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12016 )

Change subject: drop unused gsm_subscriber_connection->encr
..


Patch Set 4: Code-Review-1

according to 48.008 Ciphering Mode Complete, the BSC should send back the 
ciphering mode used (optional IE), and we do encode that IE in osmo-bsc. But 
osmo-msc doesn't decode that IE when receiving the Ciphering Mode Complete in 
msc_cipher_mode_compl(). So instead of dropping it, we should probably fix the 
IE parsing and populate the value.


--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 03:00:30 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: drop unused gsm_subscriber_connection->encr

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12016 )

Change subject: drop unused gsm_subscriber_connection->encr
..


Patch Set 4:

I'm thinking, the MSC should be able know the A5 actually used? Maybe we should 
rather fix or re-add later...


--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 02:51:43 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: drop unused gsm_subscriber_connection->encr

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/12016 )

Change subject: drop unused gsm_subscriber_connection->encr
..


Patch Set 3:

thanks man, nice catch


--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 02:49:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: drop unused gsm_subscriber_connection->encr

2018-11-29 Thread Neels Hofmeyr
Hello Vadim Yanitskiy, Jenkins Builder,

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

https://gerrit.osmocom.org/12016

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

Change subject: drop unused gsm_subscriber_connection->encr
..

drop unused gsm_subscriber_connection->encr

The gsm_subscriber_connection->encr is never used. Drop completely.
Drop the definition of struct gsm_encr from common_cs.h.
Do not print the encr.alg_id in vty_dump_one_conn(), it always was zero anyway.

Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
---
M include/osmocom/msc/common_cs.h
M include/osmocom/msc/gsm_data.h
M src/libmsc/msc_vty.c
3 files changed, 2 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/16/12016/4
--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: cosmetic: drop some unused opaque struct defs

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12034


Change subject: cosmetic: drop some unused opaque struct defs
..

cosmetic: drop some unused opaque struct defs

Change-Id: I4d461dd39d0abdc4f2327445671459340ca1c946
---
M include/osmocom/msc/db.h
M include/osmocom/msc/iu_dummy.h
M src/libmsc/iu_dummy.c
3 files changed, 0 insertions(+), 5 deletions(-)



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

diff --git a/include/osmocom/msc/db.h b/include/osmocom/msc/db.h
index a1de7d6..6d07055 100644
--- a/include/osmocom/msc/db.h
+++ b/include/osmocom/msc/db.h
@@ -24,10 +24,7 @@

 #include "gsm_subscriber.h"

-struct gsm_equipment;
 struct gsm_network;
-struct gsm_auth_info;
-struct gsm_auth_tuple;
 struct gsm_sms;

 /* one time initialisation */
diff --git a/include/osmocom/msc/iu_dummy.h b/include/osmocom/msc/iu_dummy.h
index d5e1428..01a8aa6 100644
--- a/include/osmocom/msc/iu_dummy.h
+++ b/include/osmocom/msc/iu_dummy.h
@@ -29,7 +29,6 @@
 #include 

 struct msgb;
-struct gsm_auth_tuple;
 struct RANAP_Cause;
 struct osmo_auth_vector;

diff --git a/src/libmsc/iu_dummy.c b/src/libmsc/iu_dummy.c
index bb53367..3f11d94 100644
--- a/src/libmsc/iu_dummy.c
+++ b/src/libmsc/iu_dummy.c
@@ -34,7 +34,6 @@

 struct msgb;
 struct ranap_ue_conn_ctx;
-struct gsm_auth_tuple;
 struct RANAP_Cause;
 struct osmo_auth_vector;


--
To view, visit https://gerrit.osmocom.org/12034
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: GSM_EXTENSION_LENGTH -> VLR_MSISDN_LENGTH

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12036


Change subject: GSM_EXTENSION_LENGTH -> VLR_MSISDN_LENGTH
..

GSM_EXTENSION_LENGTH -> VLR_MSISDN_LENGTH

gsm_subscriber.h contains some legacy cruft, part of which is that the VLR's
max MSISDN length should rather be defined in vlr.h. Same for GSM_NAME_LENGTH
-> VLR_NAME_LENGTH.

Adjust some sms_queue stuff that anyway includes vlr.h already.

Drop gsm_subscriber.h from vlr.h.

Add other (more concise) includes that thus become necessary, since the include
chain vlr.h->gsm_subscriber.h->gsm_data.h is no longer in place.

Change-Id: Iab5c507ec04fc2884187cf946f6ae2240e4a31f8
---
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/vlr.h
M src/libmsc/sms_queue.c
M tests/sms_queue/sms_queue_test.c
4 files changed, 9 insertions(+), 9 deletions(-)



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

diff --git a/include/osmocom/msc/gsm_subscriber.h 
b/include/osmocom/msc/gsm_subscriber.h
index 428b889..00d7b98 100644
--- a/include/osmocom/msc/gsm_subscriber.h
+++ b/include/osmocom/msc/gsm_subscriber.h
@@ -10,9 +10,6 @@

 struct ran_conn;

-#define GSM_NAME_LENGTH 160
-
-#define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */
 #define GSM_MIN_EXTEN 2
 #define GSM_MAX_EXTEN 4

diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index 1865618..c0e4864 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -10,8 +10,7 @@
 #include 
 #include 
 #include 
-// for GSM_NAME_LENGTH
-#include 
+#include 
 #include 

 #define LOGGSUPP(level, gsup, fmt, args...)\
@@ -111,6 +110,9 @@
 struct sgsn_mm_ctx;
 struct vlr_instance;

+#define VLR_NAME_LENGTH 160
+#define VLR_MSISDN_LENGTH 15
+
 /* The VLR subscriber is the part of the GSM subscriber state in VLR (CS) or
  * SGSN (PS), particularly while interacting with the HLR via GSUP */
 struct vlr_subscr {
@@ -123,8 +125,8 @@
/* Data from HLR */ /* 3GPP TS 23.008 */
/* Always use vlr_subscr_set_imsi() to write to imsi[] */
char imsi[GSM23003_IMSI_MAX_DIGITS+1];  /* 2.1.1.1 */
-   char msisdn[GSM_EXTENSION_LENGTH+1];/* 2.1.2 */
-   char name[GSM_NAME_LENGTH+1];   /* proprietary */
+   char msisdn[VLR_MSISDN_LENGTH+1];   /* 2.1.2 */
+   char name[VLR_NAME_LENGTH+1];   /* proprietary */
OSMO_LBUF_DECL(hlr, 16);/* 2.4.7 */
uint32_t periodic_lu_timer; /* 2.4.24 */
uint32_t age_indicator; /* 2.17.1 */
diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c
index fd38d50..c7fe5f4 100644
--- a/src/libmsc/sms_queue.c
+++ b/src/libmsc/sms_queue.c
@@ -64,7 +64,7 @@

struct llist_head pending_sms;

-   char last_msisdn[GSM_EXTENSION_LENGTH+1];
+   char last_msisdn[VLR_MSISDN_LENGTH+1];
 };

 static int sms_subscr_cb(unsigned int, unsigned int, void *, void *);
diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c
index e9443e0..b31824b 100644
--- a/tests/sms_queue/sms_queue_test.c
+++ b/tests/sms_queue/sms_queue_test.c
@@ -24,6 +24,7 @@
 #include 

 #include 
+#include 

 static void *talloc_ctx = NULL;

@@ -128,7 +129,7 @@
 static void test_next_sms()
 {
int i;
-   char last_msisdn[GSM_EXTENSION_LENGTH+1] = "";
+   char last_msisdn[VLR_MSISDN_LENGTH+1] = "";

printf("Testing smsq_take_next_sms()\n");


--
To view, visit https://gerrit.osmocom.org/12036
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: drop cruft from gsm_subscriber.h

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12037


Change subject: drop cruft from gsm_subscriber.h
..

drop cruft from gsm_subscriber.h

Change-Id: If6e2252486fe8d932f229a70ce5a4b6f22f6fc52
---
M include/osmocom/msc/gsm_subscriber.h
1 file changed, 0 insertions(+), 23 deletions(-)



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

diff --git a/include/osmocom/msc/gsm_subscriber.h 
b/include/osmocom/msc/gsm_subscriber.h
index 00d7b98..f8d8ef0 100644
--- a/include/osmocom/msc/gsm_subscriber.h
+++ b/include/osmocom/msc/gsm_subscriber.h
@@ -10,25 +10,6 @@

 struct ran_conn;

-#define GSM_MIN_EXTEN 2
-#define GSM_MAX_EXTEN 4
-
-#define GSM_SUBSCRIBER_FIRST_CONTACT   0x0001
-/* gprs_sgsn.h defines additional flags including and above bit 16 (0x1) */
-
-enum gsm_subscriber_field {
-   GSM_SUBSCRIBER_IMSI,
-   GSM_SUBSCRIBER_TMSI,
-   GSM_SUBSCRIBER_EXTENSION,
-   GSM_SUBSCRIBER_ID,
-};
-
-enum gsm_subscriber_update_reason {
-   GSM_SUBSCRIBER_UPDATE_ATTACHED,
-   GSM_SUBSCRIBER_UPDATE_DETACHED,
-   GSM_SUBSCRIBER_UPDATE_EQUIPMENT,
-};
-
 /*
  * Struct for pending channel requests. This is managed in the
  * llist_head requests of each subscriber. The reference counting
@@ -46,8 +27,6 @@
void *param;
 };

-int subscr_update(struct vlr_subscr *vsub, int reason);
-
 /*
  * Paging handling with authentication
  */
@@ -56,8 +35,6 @@
   const char *label);

 void subscr_remove_request(struct subscr_request *req);
-int subscr_rx_paging_response(struct msgb *msg,
- struct ran_conn *conn);

 void subscr_paging_cancel(struct vlr_subscr *vsub, enum gsm_paging_event 
event);
 int subscr_paging_dispatch(unsigned int hooknum, unsigned int event,

--
To view, visit https://gerrit.osmocom.org/12037
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: move subscr_conn.c to ran_conn.c

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12031


Change subject: move subscr_conn.c to ran_conn.c
..

move subscr_conn.c to ran_conn.c

subscr_conn.c exclusively defines ran_conn related things. Rename the file.

Change-Id: I6aa6b335842116c717a554c981083a914724ee21
---
M src/libmsc/Makefile.am
R src/libmsc/ran_conn.c
2 files changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/src/libmsc/Makefile.am b/src/libmsc/Makefile.am
index 90bbbf8..9183ff9 100644
--- a/src/libmsc/Makefile.am
+++ b/src/libmsc/Makefile.am
@@ -44,13 +44,13 @@
mncc_sock.c \
msc_ifaces.c \
msc_mgcp.c \
+   ran_conn.c \
rrlp.c \
silent_call.c \
sms_queue.c \
transaction.c \
osmo_msc.c \
ctrl_commands.c \
-   subscr_conn.c \
$(NULL)
 if BUILD_IU
 libmsc_a_SOURCES += \
diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/ran_conn.c
similarity index 99%
rename from src/libmsc/subscr_conn.c
rename to src/libmsc/ran_conn.c
index 5fab1c6..9b63f16 100644
--- a/src/libmsc/subscr_conn.c
+++ b/src/libmsc/ran_conn.c
@@ -25,7 +25,7 @@
 #include 
 #include 

-#include 
+#include 
 #include 
 #include 
 #include 

--
To view, visit https://gerrit.osmocom.org/12031
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: move gsm_cbfn to gsm_subscriber.h, the only user

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12038


Change subject: move gsm_cbfn to gsm_subscriber.h, the only user
..

move gsm_cbfn to gsm_subscriber.h, the only user

(with two less line feeds)

Change-Id: I375e5b021e643f6b1986ea35ebaf3a6d60e189f5
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_subscriber.h
2 files changed, 4 insertions(+), 6 deletions(-)



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

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 30a3c79..d3cb7d8 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -36,12 +36,6 @@

 #define tmsi_from_string(str) strtoul(str, NULL, 10)

-struct msgb;
-typedef int gsm_cbfn(unsigned int hooknum,
-unsigned int event,
-struct msgb *msg,
-void *data, void *param);
-
 enum {
MSC_CTR_LOC_UPDATE_TYPE_ATTACH,
MSC_CTR_LOC_UPDATE_TYPE_NORMAL,
diff --git a/include/osmocom/msc/gsm_subscriber.h 
b/include/osmocom/msc/gsm_subscriber.h
index f8d8ef0..2051067 100644
--- a/include/osmocom/msc/gsm_subscriber.h
+++ b/include/osmocom/msc/gsm_subscriber.h
@@ -9,6 +9,10 @@
 #include 

 struct ran_conn;
+struct msgb;
+
+typedef int gsm_cbfn(unsigned int hooknum, unsigned int event, struct msgb 
*msg,
+void *data, void *param);

 /*
  * Struct for pending channel requests. This is managed in the

--
To view, visit https://gerrit.osmocom.org/12038
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: drop unused SUBSCR_CONN_E_INVALID

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12025


Change subject: drop unused SUBSCR_CONN_E_INVALID
..

drop unused SUBSCR_CONN_E_INVALID

The idea to catch uninitialized vars was completely moot. We pass events by
constants anyway.

Change-Id: I6f3c964ee04fec9a96f385199fb3141ac8d672d4
---
M include/osmocom/msc/osmo_msc.h
M src/libmsc/subscr_conn.c
2 files changed, 0 insertions(+), 3 deletions(-)



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

diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h
index a757a99..ad81da5 100644
--- a/include/osmocom/msc/osmo_msc.h
+++ b/include/osmocom/msc/osmo_msc.h
@@ -12,8 +12,6 @@
 #define MSC_HLR_REMOTE_PORT_DEFAULT OSMO_GSUP_PORT

 enum subscr_conn_fsm_event {
-   /* Mark 0 as invalid to catch uninitialized vars */
-   SUBSCR_CONN_E_INVALID = 0,
/* Accepted the initial Complete Layer 3 (starting to evaluate 
Authentication and Ciphering) */
SUBSCR_CONN_E_COMPLETE_LAYER_3,
/* Received Classmark Update, typically neede for Ciphering Mode 
Command */
diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c
index e6fa7e1..78af274 100644
--- a/src/libmsc/subscr_conn.c
+++ b/src/libmsc/subscr_conn.c
@@ -43,7 +43,6 @@
 #define SUBSCR_CONN_TIMEOUT 5 /* seconds */

 static const struct value_string subscr_conn_fsm_event_names[] = {
-   OSMO_VALUE_STRING(SUBSCR_CONN_E_INVALID),
OSMO_VALUE_STRING(SUBSCR_CONN_E_COMPLETE_LAYER_3),
OSMO_VALUE_STRING(SUBSCR_CONN_E_CLASSMARK_UPDATE),
OSMO_VALUE_STRING(SUBSCR_CONN_E_ACCEPTED),

--
To view, visit https://gerrit.osmocom.org/12025
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: move ran_conn declarations to new ran_conn.h

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12032


Change subject: move ran_conn declarations to new ran_conn.h
..

move ran_conn declarations to new ran_conn.h

With the dawn of inter-BSC,MSC handover, adopting the MSC-A,-I,-T roles from
3GPP TS 49.008, the RAN connection shall soon be a neatly separated corner of
osmo-msc, so gravitate ran_conn decarations to files of matching name.

Also, the current chaos of API defined in files with mismatching/meaningless
names drives me crazy.

Change-Id: Ice31e6c43e46678538c65261f150c67e1d0845e5
---
M include/osmocom/msc/Makefile.am
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/msc_mgcp.h
M include/osmocom/msc/osmo_msc.h
A include/osmocom/msc/ran_conn.h
M include/osmocom/msc/vlr.h
M src/libmsc/rrlp.c
8 files changed, 242 insertions(+), 240 deletions(-)



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

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 28e4b14..9fa58c7 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -22,6 +22,7 @@
msc_mgcp.h \
a_reset.h \
osmo_msc.h \
+   ran_conn.h \
rrlp.h \
signal.h \
silent_call.h \
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 0028a3d..35ec752 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -12,7 +12,6 @@
 #include 
 #include 
 #include 
-#include 

 #include 
 #include 
@@ -34,7 +33,6 @@
 struct mncc_sock_state;
 struct vlr_instance;
 struct vlr_subscr;
-struct ranap_ue_conn_ctx;

 #define tmsi_from_string(str) strtoul(str, NULL, 10)

@@ -51,139 +49,6 @@
 };
 #define GSM_KEY_SEQ_INVAL  7   /* GSM 04.08 - 10.5.1.2 */

-enum ran_type {
-   RAN_UNKNOWN,
-   RAN_GERAN_A,/* 2G / A-interface */
-   RAN_UTRAN_IU,   /* 3G / Iu-interface (IuCS or IuPS) */
-};
-
-extern const struct value_string ran_type_names[];
-static inline const char *ran_type_name(enum ran_type val)
-{  return get_value_string(ran_type_names, val);   }
-
-struct gsm_classmark {
-   bool classmark1_set;
-   struct gsm48_classmark1 classmark1;
-   uint8_t classmark2_len;
-   uint8_t classmark2[3];
-   uint8_t classmark3_len;
-   uint8_t classmark3[14]; /* if cm3 gets extended by spec, it will be 
truncated */
-};
-
-enum integrity_protection_state {
-   INTEGRITY_PROTECTION_NONE   = 0,
-   INTEGRITY_PROTECTION_IK = 1,
-   INTEGRITY_PROTECTION_IK_CK  = 2,
-};
-
-enum complete_layer3_type {
-   COMPLETE_LAYER3_NONE,
-   COMPLETE_LAYER3_LU,
-   COMPLETE_LAYER3_CM_SERVICE_REQ,
-   COMPLETE_LAYER3_PAGING_RESP,
-};
-
-extern const struct value_string complete_layer3_type_names[];
-static inline const char *complete_layer3_type_name(enum complete_layer3_type 
val)
-{
-   return get_value_string(complete_layer3_type_names, val);
-}
-
-/* active radio connection of a mobile subscriber */
-struct ran_conn {
-   /* global linked list of ran_conn instances */
-   struct llist_head entry;
-
-   /* FSM instance to control the RAN connection's permissions and 
lifetime. */
-   struct osmo_fsm_inst *fi;
-   enum complete_layer3_type complete_layer3_type;
-
-   /* usage count. If this drops to zero, we start the release
-* towards A/Iu */
-   uint32_t use_count;
-   uint32_t use_tokens;
-
-   /* The MS has opened the conn with a CM Service Request, and we shall
-* keep it open for an actual request (or until timeout). */
-   bool received_cm_service_request;
-
-   /* libmsc/libvlr subscriber information (if available) */
-   struct vlr_subscr *vsub;
-
-   /* LU expiration handling */
-   uint8_t expire_timer_stopped;
-   /* SMS helpers for libmsc */
-   uint8_t next_rp_ref;
-
-   /* Are we part of a special "silent" call */
-   int silent_call;
-
-   /* back pointers */
-   struct gsm_network *network;
-
-   /* connected via 2G or 3G? */
-   enum ran_type via_ran;
-
-   uint16_t lac;
-
-   /* "Temporary" storage for the case the VLR asked for Cipher Mode 
Command, but the MSC still
-* wants to request a Classmark Update first. */
-   struct {
-   bool umts_aka;
-   bool retrieve_imeisv;
-   } geran_set_cipher_mode;
-
-   /* N(SD) expected in the received frame, per flow (TS 24.007 
11.2.3.2.3.2.2) */
-   uint8_t n_sd_next[4];
-
-   struct {
-   struct mgcp_ctx *mgcp_ctx;
-   unsigned int mgcp_rtp_endpoint;
-
-   uint16_t local_port_ran;
-   char local_addr_ran[INET_ADDRSTRLEN];
-   uint16_t remote_port_ran;
-   char remote_addr_ran[INET_ADDRSTRLEN];
-   enum 

Change in osmo-msc[master]: drop unused openbscdefines.h

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12024


Change subject: drop unused openbscdefines.h
..

drop unused openbscdefines.h

Change-Id: If35cd49baa4d0a3b38f31736e1696f481babba9c
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/openbscdefines.h
2 files changed, 0 insertions(+), 35 deletions(-)



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

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index ebc946a..28e4b14 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -20,7 +20,6 @@
mncc_int.h \
msc_ifaces.h \
msc_mgcp.h \
-   openbscdefines.h \
a_reset.h \
osmo_msc.h \
rrlp.h \
diff --git a/include/osmocom/msc/openbscdefines.h 
b/include/osmocom/msc/openbscdefines.h
deleted file mode 100644
index c6ac153..000
--- a/include/osmocom/msc/openbscdefines.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * (C) 2009 by Holger Hans Peter Freyther 
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see .
- *
- */
-
-#ifndef OPENBSCDEFINES_H
-#define OPENBSCDEFINES_H
-
-#ifdef BUILDING_ON_WINDOWS
-#ifdef BUILDING_OPENBSC
-#define BSC_API __declspec(dllexport)
-#else
-#define BSC_API __declspec(dllimport)
-#endif
-#else
-#define BSC_API __attribute__((visibility("default")))
-#endif
-
-#endif

--
To view, visit https://gerrit.osmocom.org/12024
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: drop unused tests/db/*

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12027


Change subject: drop unused tests/db/*
..

drop unused tests/db/*

Another one of those "what is this still doing here". Not mentioned in
configure.ac nor Makefile.am SUBDIR...

Change-Id: I05880507d9bf029f0ec451efda0ebe54ac09ef12
---
D tests/db/Makefile.am
D tests/db/db_test.c
D tests/db/db_test.err
D tests/db/db_test.ok
D tests/db/hlr.sqlite3
5 files changed, 0 insertions(+), 337 deletions(-)



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

diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am
deleted file mode 100644
index 249a873..000
--- a/tests/db/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
-AM_CPPFLAGS = \
-   $(all_includes) \
-   -I$(top_srcdir)/include \
-   $(NULL)
-
-AM_CFLAGS = \
-   -Wall \
-   -ggdb3 \
-   $(LIBOSMOCORE_CFLAGS) \
-   $(LIBOSMOGSM_CFLAGS) \
-   $(LIBOSMOABIS_CFLAGS) \
-   $(LIBSMPP34_CFLAGS) \
-   $(COVERAGE_CFLAGS) \
-   $(NULL)
-
-AM_LDFLAGS = \
-   $(COVERAGE_LDFLAGS) \
-   $(NULL)
-
-EXTRA_DIST = \
-   db_test.ok \
-   db_test.err \
-   hlr.sqlite3 \
-   $(NULL)
-
-noinst_PROGRAMS = \
-   db_test \
-   $(NULL)
-
-db_test_SOURCES = \
-   db_test.c \
-   $(NULL)
-
-db_test_LDADD = \
-   $(top_builddir)/src/libmsc/libmsc.a \
-   $(top_builddir)/src/libtrau/libtrau.a \
-   $(top_builddir)/tests/libiudummy/libiudummy.a \
-   $(LIBOSMOCORE_LIBS) \
-   $(LIBOSMOABIS_LIBS) \
-   $(LIBOSMOGSM_LIBS) \
-   $(LIBSMPP34_LIBS) \
-   $(LIBOSMOVTY_LIBS) \
-   -ldbi \
-   $(NULL)
diff --git a/tests/db/db_test.c b/tests/db/db_test.c
deleted file mode 100644
index 63099f6..000
--- a/tests/db/db_test.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/* (C) 2008 by Jan Luebbe 
- * (C) 2009-2016 by Holger Hans Peter Freyther 
- * (C) 2014 by Alexander Chemeris 
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see .
- *
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-static struct gsm_network dummy_net;
-static struct gsm_subscriber_group dummy_sgrp;
-
-#define SUBSCR_PUT(sub) \
-   sub->group = _sgrp;   \
-   subscr_put(sub);
-
-#define COMPARE(original, copy) \
-   if (original->id != copy->id) \
-   printf("Ids do not match in %s:%d %llu %llu\n", \
-   __FUNCTION__, __LINE__, original->id, copy->id); \
-   if (original->lac != copy->lac) \
-   printf("LAC do not match in %s:%d %d %d\n", \
-   __FUNCTION__, __LINE__, original->lac, copy->lac); \
-   if (original->authorized != copy->authorized) \
-   printf("Authorize do not match in %s:%d %d %d\n", \
-   __FUNCTION__, __LINE__, original->authorized, \
-   copy->authorized); \
-   if (strcmp(original->imsi, copy->imsi) != 0) \
-   printf("IMSIs do not match in %s:%d '%s' '%s'\n", \
-   __FUNCTION__, __LINE__, original->imsi, copy->imsi); \
-   if (original->tmsi != copy->tmsi) \
-   printf("TMSIs do not match in %s:%d '%u' '%u'\n", \
-   __FUNCTION__, __LINE__, original->tmsi, copy->tmsi); \
-   if (strcmp(original->name, copy->name) != 0) \
-   printf("names do not match in %s:%d '%s' '%s'\n", \
-   __FUNCTION__, __LINE__, original->name, copy->name); \
-   if (strcmp(original->extension, copy->extension) != 0) \
-   printf("Extensions do not match in %s:%d '%s' '%s'\n", \
-   __FUNCTION__, __LINE__, original->extension, 
copy->extension); \
-
-/*
- * Create/Store a SMS and then try to load it.
- */
-static void test_sms(void)
-{
-   int rc;
-   struct gsm_sms *sms;
-   struct gsm_subscriber *subscr;
-   subscr = db_get_subscriber(GSM_SUBSCRIBER_IMSI, "9993245423445");
-   OSMO_ASSERT(subscr);
-   subscr->group = _sgrp;
-
-   sms = sms_alloc();
-   sms->receiver = subscr_get(subscr);
-
-   sms->src.ton = 0x23;
-   sms->src.npi = 0x24;
-   memcpy(sms->src.addr, "1234", strlen("1234") + 1);
-
-   

Change in osmo-msc[master]: drop msc_compl_l3() return value

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12029


Change subject: drop msc_compl_l3() return value
..

drop msc_compl_l3() return value

msc_compl_l3() always returns MSC_CONN_ACCEPT, because the conn FSM handles (or
should handle) all reject cases. The accept/reject return value is a legacy
from libbsc internally passing a conn over to libmsc, in osmo-nitb.

Drop enum msc_compl_l3_rc.
Change msc_compl_l3_rc() to return void.
Change all callers to always act like for acceptance, as they always did anyway.
Drop some local variables now no longer needed.
Adjust the comment to msc_compl_l3().
Drop a bunch of #if-0'd code from msc_compl_l3().

Change-Id: I759d15f4e820d5fc16397ed7210ce92308e52a09
---
M include/osmocom/msc/osmo_msc.h
M src/libmsc/a_iface_bssap.c
M src/libmsc/iucs.c
M src/libmsc/osmo_msc.c
4 files changed, 11 insertions(+), 51 deletions(-)



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

diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h
index ad81da5..674de3b 100644
--- a/include/osmocom/msc/osmo_msc.h
+++ b/include/osmocom/msc/osmo_msc.h
@@ -40,11 +40,6 @@
SUBSCR_CONN_S_RELEASED,
 };

-enum msc_compl_l3_rc {
-   MSC_CONN_ACCEPT = 0,
-   MSC_CONN_REJECT = 1,
-};
-
 struct gsm_subscriber_connection *msc_subscr_conn_alloc(struct gsm_network 
*network,
enum ran_type via_ran, 
uint16_t lac);

@@ -59,8 +54,8 @@

 void msc_sapi_n_reject(struct gsm_subscriber_connection *conn, int dlci);
 int msc_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause);
-int msc_compl_l3(struct gsm_subscriber_connection *conn,
-struct msgb *msg, uint16_t chosen_channel);
+void msc_compl_l3(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, uint16_t chosen_channel);
 void msc_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg);
 int msc_classmark_request_then_cipher_mode_cmd(struct 
gsm_subscriber_connection *conn, bool umts_aka,
   bool retrieve_imeisv);
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 9a2333d..77d84b3 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -260,8 +260,6 @@
uint16_t lac = 0;
uint8_t data_length;
const uint8_t *data;
-   int rc;
-
struct gsm_network *network = a_conn_info->network;
struct gsm_subscriber_connection *conn;

@@ -345,17 +343,8 @@
conn = subscr_conn_allocate_a(a_conn_info, network, lac, scu, 
a_conn_info->conn_id);

/* Handover location update to the MSC code */
-   rc = msc_compl_l3(conn, msg, 0);
-
-   if (rc == MSC_CONN_ACCEPT) {
-   LOGP(DMSC, LOGL_INFO, "User has been accepted by MSC.\n");
-   return 0;
-   } else if (rc == MSC_CONN_REJECT)
-   LOGP(DMSC, LOGL_INFO, "User has been rejected by MSC.\n");
-   else
-   LOGP(DMSC, LOGL_INFO, "User has been rejected by MSC (unknown 
error)\n");
-
-   return -EINVAL;
+   msc_compl_l3(conn, msg, 0);
+   return 0;
 }
 
 /* Endpoint to handle BSSMAP classmark update */
diff --git a/src/libmsc/iucs.c b/src/libmsc/iucs.c
index 95bbbee..c3fea0d 100644
--- a/src/libmsc/iucs.c
+++ b/src/libmsc/iucs.c
@@ -142,7 +142,6 @@
 int gsm0408_rcvmsg_iucs(struct gsm_network *network, struct msgb *msg,
uint16_t *lac)
 {
-   int rc;
struct ranap_ue_conn_ctx *ue_ctx;
struct gsm_subscriber_connection *conn;

@@ -174,7 +173,6 @@
OSMO_ASSERT(pdisc != GSM48_PDISC_RR);

msc_dtap(conn, msg);
-   rc = 0;
} else {
/* allocate a new connection */

@@ -191,10 +189,10 @@
abort();

/* ownership of conn hereby goes to the MSC: */
-   rc = msc_compl_l3(conn, msg, 0);
+   msc_compl_l3(conn, msg, 0);
}

-   return rc;
+   return 0;
 }

 int iu_rab_act_cs(struct gsm_trans *trans)
diff --git a/src/libmsc/osmo_msc.c b/src/libmsc/osmo_msc.c
index f2c84e6..9a371a4 100644
--- a/src/libmsc/osmo_msc.c
+++ b/src/libmsc/osmo_msc.c
@@ -87,37 +87,15 @@
gsm411_sapi_n_reject(conn);
 }

-/* receive a Level 3 Complete message and return MSC_CONN_ACCEPT or
- * MSC_CONN_REJECT */
-int msc_compl_l3(struct gsm_subscriber_connection *conn,
-struct msgb *msg, uint16_t chosen_channel)
+/* receive a Level 3 Complete message.
+ * Ownership of the conn is completely passed to the conn FSM, i.e. for both 
acceptance and rejection,
+ * the conn FSM shall decide when to release this conn. It may already be 
discarded before this exits. */
+void msc_compl_l3(struct gsm_subscriber_connection *conn,
+ struct msgb *msg, uint16_t chosen_channel)

Change in osmo-msc[master]: rename some RAN conn related stuff to ran_conn_*

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12030


Change subject: rename some RAN conn related stuff to ran_conn_*
..

rename some RAN conn related stuff to ran_conn_*

Following previous rename of gsm_subscriber_connection:

Some functions and #defines are still called like "msc_conn" or just "msc_",
while they are clearly about a RAN conn.

To avoid confusion with the future separate concepts of MSC roles and a RAN
connection, rename all those to match the common "ran_conn" prefix.

Change-Id: Ia17a0a35f11911e00e19cafb5d7828d729a69640
---
M include/osmocom/msc/osmo_msc.h
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_09_11.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/osmo_msc.c
M src/libmsc/silent_call.c
M src/libmsc/subscr_conn.c
M src/libmsc/transaction.c
M tests/msc_vlr/msc_vlr_test_call.c
M tests/msc_vlr/msc_vlr_tests.c
15 files changed, 97 insertions(+), 97 deletions(-)



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

diff --git a/include/osmocom/msc/osmo_msc.h b/include/osmocom/msc/osmo_msc.h
index 713d0de..d8b34d6 100644
--- a/include/osmocom/msc/osmo_msc.h
+++ b/include/osmocom/msc/osmo_msc.h
@@ -50,21 +50,21 @@
 int msc_vlr_alloc(struct gsm_network *net);
 int msc_vlr_start(struct gsm_network *net);

-void msc_sapi_n_reject(struct ran_conn *conn, int dlci);
-int msc_clear_request(struct ran_conn *conn, uint32_t cause);
-void msc_compl_l3(struct ran_conn *conn,
- struct msgb *msg, uint16_t chosen_channel);
-void msc_dtap(struct ran_conn *conn, struct msgb *msg);
-int msc_classmark_request_then_cipher_mode_cmd(struct ran_conn *conn, bool 
umts_aka,
+void ran_conn_sapi_n_reject(struct ran_conn *conn, int dlci);
+int ran_conn_clear_request(struct ran_conn *conn, uint32_t cause);
+void ran_conn_compl_l3(struct ran_conn *conn,
+  struct msgb *msg, uint16_t chosen_channel);
+void ran_conn_dtap(struct ran_conn *conn, struct msgb *msg);
+int ran_conn_classmark_request_then_cipher_mode_cmd(struct ran_conn *conn, 
bool umts_aka,
   bool retrieve_imeisv);
-int msc_geran_set_cipher_mode(struct ran_conn *conn, bool umts_aka, bool 
retrieve_imeisv);
-void msc_cipher_mode_compl(struct ran_conn *conn,
+int ran_conn_geran_set_cipher_mode(struct ran_conn *conn, bool umts_aka, bool 
retrieve_imeisv);
+void ran_conn_cipher_mode_compl(struct ran_conn *conn,
   struct msgb *msg, uint8_t alg_id);
-void msc_rx_sec_mode_compl(struct ran_conn *conn);
-void msc_classmark_chg(struct ran_conn *conn,
+void ran_conn_rx_sec_mode_compl(struct ran_conn *conn);
+void ran_conn_classmark_chg(struct ran_conn *conn,
   const uint8_t *cm2, uint8_t cm2_len,
   const uint8_t *cm3, uint8_t cm3_len);
-void msc_assign_fail(struct ran_conn *conn,
+void ran_conn_assign_fail(struct ran_conn *conn,
 uint8_t cause, uint8_t *rr_cause);

 void ran_conn_init(void);
@@ -79,16 +79,16 @@
 void ran_conn_rx_iu_release_complete(struct ran_conn *conn);

 enum ran_conn_use {
-   MSC_CONN_USE_UNTRACKED = -1,
-   MSC_CONN_USE_COMPL_L3,
-   MSC_CONN_USE_DTAP,
-   MSC_CONN_USE_AUTH_CIPH,
-   MSC_CONN_USE_CM_SERVICE,
-   MSC_CONN_USE_TRANS_CC,
-   MSC_CONN_USE_TRANS_SMS,
-   MSC_CONN_USE_TRANS_NC_SS,
-   MSC_CONN_USE_SILENT_CALL,
-   MSC_CONN_USE_RELEASE,
+   RAN_CONN_USE_UNTRACKED = -1,
+   RAN_CONN_USE_COMPL_L3,
+   RAN_CONN_USE_DTAP,
+   RAN_CONN_USE_AUTH_CIPH,
+   RAN_CONN_USE_CM_SERVICE,
+   RAN_CONN_USE_TRANS_CC,
+   RAN_CONN_USE_TRANS_SMS,
+   RAN_CONN_USE_TRANS_NC_SS,
+   RAN_CONN_USE_SILENT_CALL,
+   RAN_CONN_USE_RELEASE,
 };

 extern const struct value_string ran_conn_use_names[];
diff --git a/src/libmsc/a_iface.c b/src/libmsc/a_iface.c
index fa0cb5f..82519d6 100644
--- a/src/libmsc/a_iface.c
+++ b/src/libmsc/a_iface.c
@@ -629,7 +629,7 @@
uint32_t conn_id = conn->a.conn_id;
LOGPCONN(conn, LOGL_NOTICE, "Dropping orphaned RAN 
connection\n");
/* This call will/may talloc_free(conn), so we must 
save conn_id above */
-   msc_clear_request(conn, GSM48_CC_CAUSE_SWITCH_CONG);
+   ran_conn_clear_request(conn, 
GSM48_CC_CAUSE_SWITCH_CONG);

/* If there is still an SCCP connection active, remove 
it now */
if (check_connection_active(conn_id)) {
diff --git a/src/libmsc/a_iface_bssap.c b/src/libmsc/a_iface_bssap.c
index 31cdb06..4d03d23 100644
--- a/src/libmsc/a_iface_bssap.c
+++ b/src/libmsc/a_iface_bssap.c
@@ -343,7 +343,7 @@
conn = ran_conn_allocate_a(a_conn_info, network, lac, scu, 

Change in osmo-msc[master]: drop unused gsm0408_allow_everyone() declaration

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12026


Change subject: drop unused gsm0408_allow_everyone() declaration
..

drop unused gsm0408_allow_everyone() declaration

Change-Id: Id56ea492594edc38d1f9d31d94a1679c0cb61fa0
---
M include/osmocom/msc/gsm_04_08.h
1 file changed, 0 insertions(+), 1 deletion(-)



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

diff --git a/include/osmocom/msc/gsm_04_08.h b/include/osmocom/msc/gsm_04_08.h
index 8767070..0692e09 100644
--- a/include/osmocom/msc/gsm_04_08.h
+++ b/include/osmocom/msc/gsm_04_08.h
@@ -26,7 +26,6 @@
  struct msgb *msg);

 /* config options controlling the behaviour of the lower leves */
-void gsm0408_allow_everyone(int allow);
 void gsm0408_clear_all_trans(struct gsm_network *net, int protocol);
 int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg);


--
To view, visit https://gerrit.osmocom.org/12026
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: move gsm_auth_tuple to vlr.h as vlr_auth_tuple

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12035


Change subject: move gsm_auth_tuple to vlr.h as vlr_auth_tuple
..

move gsm_auth_tuple to vlr.h as vlr_auth_tuple

Along goes GSM_KEYSEQ_INVAL as VLR_*.

It's where it logically belongs, and is almost the only reason why vlr.h
includes gsm_data.h. The remaining reason, GSM_EXTENSION_LENGTH, will be moved
by upcoming patch.

Change-Id: I122feae7ee3cbc59e941daef35a954bce29fec76
---
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/vlr.h
M src/libmsc/gsm_04_08.c
M src/libmsc/msc_vty.c
M src/libvlr/vlr.c
M src/libvlr/vlr_auth_fsm.c
M tests/msc_vlr/msc_vlr_tests.c
7 files changed, 27 insertions(+), 26 deletions(-)



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

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 3ffa100..30a3c79 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -42,13 +42,6 @@
 struct msgb *msg,
 void *data, void *param);

-struct gsm_auth_tuple {
-   int use_count;
-   int key_seq;
-   struct osmo_auth_vector vec;
-};
-#define GSM_KEY_SEQ_INVAL  7   /* GSM 04.08 - 10.5.1.2 */
-
 enum {
MSC_CTR_LOC_UPDATE_TYPE_ATTACH,
MSC_CTR_LOC_UPDATE_TYPE_NORMAL,
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index 1168c32..1865618 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -77,6 +77,14 @@
VLR_CIPH_COMPL,
 };

+struct vlr_auth_tuple {
+   int use_count;
+   int key_seq;
+   struct osmo_auth_vector vec;
+};
+#define VLR_KEY_SEQ_INVAL  7   /* GSM 04.08 - 10.5.1.2 */
+
+
 struct vlr_ciph_result {
enum vlr_ciph_result_cause cause;
char imeisv[GSM48_MI_SIZE];
@@ -122,8 +130,8 @@
uint32_t age_indicator; /* 2.17.1 */

/* Authentication Data */
-   struct gsm_auth_tuple auth_tuples[5];   /* 2.3.1-2.3.4 */
-   struct gsm_auth_tuple *last_tuple;
+   struct vlr_auth_tuple auth_tuples[5];   /* 2.3.1-2.3.4 */
+   struct vlr_auth_tuple *last_tuple;
enum vlr_subscr_security_context sec_ctx;

/* Data local to VLR is below */
@@ -205,7 +213,7 @@
 * \param[in] at  auth tuple providing rand, key_seq and autn.
 * \param[in] send_autn  True to send AUTN, for r99 UMTS auth.
 */
-   int (*tx_auth_req)(void *msc_conn_ref, struct gsm_auth_tuple *at,
+   int (*tx_auth_req)(void *msc_conn_ref, struct vlr_auth_tuple *at,
   bool send_autn);
/* encode + transmit an AUTH REJECT towards the MS */
int (*tx_auth_rej)(void *msc_conn_ref);
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 83f8d99..e159419 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -1513,7 +1513,7 @@
  ***/

 /* VLR asks us to send an authentication request */
-static int msc_vlr_tx_auth_req(void *msc_conn_ref, struct gsm_auth_tuple *at,
+static int msc_vlr_tx_auth_req(void *msc_conn_ref, struct vlr_auth_tuple *at,
   bool send_autn)
 {
struct ran_conn *conn = msc_conn_ref;
@@ -1599,7 +1599,7 @@
int i, j = 0;
int request_classmark = 0;
int request_classmark_for_a5_n = 0;
-   struct gsm_auth_tuple *tuple = conn->vsub->last_tuple;
+   struct vlr_auth_tuple *tuple = conn->vsub->last_tuple;

if (!conn || !conn->vsub || !conn->vsub->last_tuple) {
/* This should really never happen, because we checked this in 
msc_vlr_set_ciph_mode()
@@ -1672,7 +1672,7 @@
 {
struct ran_conn *conn = msc_conn_ref;
struct vlr_subscr *vsub;
-   struct gsm_auth_tuple *tuple;
+   struct vlr_auth_tuple *tuple;

if (!conn || !conn->vsub) {
LOGP(DMM, LOGL_ERROR, "Cannot send Ciphering Mode Command to"
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 03dbbc9..87e59f6 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -601,7 +601,7 @@
 #endif

if (vsub->last_tuple) {
-   struct gsm_auth_tuple *t = vsub->last_tuple;
+   struct vlr_auth_tuple *t = vsub->last_tuple;
vty_out(vty, "A3A8 last tuple (used %d times):%s",
t->use_count, VTY_NEWLINE);
vty_out(vty, " seq # : %d%s",
diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index c777d8a..b424563 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -241,7 +241,7 @@
vsub->tmsi_new = GSM_RESERVED_TMSI;

for (i = 0; i < ARRAY_SIZE(vsub->auth_tuples); i++)
-   vsub->auth_tuples[i].key_seq = GSM_KEY_SEQ_INVAL;
+   vsub->auth_tuples[i].key_seq = VLR_KEY_SEQ_INVAL;


Change in osmo-msc[master]: combine several small .h in msc_common.h

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12033


Change subject: combine several small .h in msc_common.h
..

combine several small .h in msc_common.h

For hysterical raisins, there are some header files that contain few
declarations, and where the name doesn't reflect the content. Combine them to
new msc_common.h:

- common.h
- common_cs.h
- debug.h
- osmo_msc.h
=> msc_common.h

Change-Id: I9e3a587342f8d398fb27354a2f2475f8797cdb28
---
M include/osmocom/msc/Makefile.am
D include/osmocom/msc/common.h
D include/osmocom/msc/common_cs.h
D include/osmocom/msc/debug.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_data_shared.h
A include/osmocom/msc/msc_common.h
D include/osmocom/msc/osmo_msc.h
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/a_reset.c
M src/libmsc/ctrl_commands.c
M src/libmsc/db.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_09_11.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/mncc.c
M src/libmsc/mncc_builtin.c
M src/libmsc/mncc_sock.c
M src/libmsc/msc_ifaces.c
M src/libmsc/msc_mgcp.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M src/libmsc/ran_conn.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.c
M src/libmsc/sms_queue.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/libvlr/vlr_access_req_fsm.c
M src/libvlr/vlr_auth_fsm.c
M src/libvlr/vlr_lu_fsm.c
M src/osmo-msc/msc_main.c
M src/utils/smpp_mirror.c
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
M tests/smpp/smpp_test.c
M tests/sms_queue/sms_queue_test.c
45 files changed, 52 insertions(+), 113 deletions(-)



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

diff --git a/include/osmocom/msc/Makefile.am b/include/osmocom/msc/Makefile.am
index 9fa58c7..ca83b2d 100644
--- a/include/osmocom/msc/Makefile.am
+++ b/include/osmocom/msc/Makefile.am
@@ -1,10 +1,7 @@
 noinst_HEADERS = \
a_iface.h \
a_iface_bssap.h \
-   common.h \
-   common_cs.h \
db.h \
-   debug.h \
gsm_04_08.h \
gsm_04_11.h \
gsm_04_14.h \
@@ -18,10 +15,10 @@
iu_dummy.h \
mncc.h \
mncc_int.h \
+   msc_common.h \
msc_ifaces.h \
msc_mgcp.h \
a_reset.h \
-   osmo_msc.h \
ran_conn.h \
rrlp.h \
signal.h \
diff --git a/include/osmocom/msc/common.h b/include/osmocom/msc/common.h
deleted file mode 100644
index d91b3d3..000
--- a/include/osmocom/msc/common.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-enum nsap_addr_enc {
-   NSAP_ADDR_ENC_X213,
-   NSAP_ADDR_ENC_V4RAW,
-};
diff --git a/include/osmocom/msc/common_cs.h b/include/osmocom/msc/common_cs.h
deleted file mode 100644
index 14fe618..000
--- a/include/osmocom/msc/common_cs.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#pragma once
-
-struct msgb;
-struct gsm_network;
-
-typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *);
-
-struct gsm_network *gsm_network_init(void *ctx, mncc_recv_cb_t mncc_recv);
diff --git a/include/osmocom/msc/debug.h b/include/osmocom/msc/debug.h
deleted file mode 100644
index 717cf74..000
--- a/include/osmocom/msc/debug.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#pragma once
-
-#include 
-
-/* Debug Areas of the code */
-enum {
-   DRLL,
-   DCC,
-   DMM,
-   DRR,
-   DMNCC,
-   DPAG,
-   DMSC,
-   DMGCP,
-   DHO,
-   DDB,
-   DREF,
-   DCTRL,
-   DSMPP,
-   DRANAP,
-   DVLR,
-   DIUCS,
-   DBSSAP,
-   Debug_LastEntry,
-};
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 35ec752..3ffa100 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -13,10 +13,10 @@
 #include 
 #include 

-#include 
-#include 
 #include 

+#include 
+
 #include "gsm_data_shared.h"

 /* TS 48.008 DLCI containing DCCH/ACCH + SAPI */
diff --git a/include/osmocom/msc/gsm_data_shared.h 
b/include/osmocom/msc/gsm_data_shared.h
index f71e92b..732607b 100644
--- a/include/osmocom/msc/gsm_data_shared.h
+++ b/include/osmocom/msc/gsm_data_shared.h
@@ -12,8 +12,6 @@
 #include 
 #include 

-#include 
-
 struct osmo_bsc_data;

 struct osmo_bsc_sccp_con;
diff --git a/include/osmocom/msc/msc_common.h b/include/osmocom/msc/msc_common.h
new file mode 100644
index 000..d0c2c0b
--- /dev/null
+++ b/include/osmocom/msc/msc_common.h
@@ -0,0 +1,43 @@
+#pragma once
+
+struct msgb;
+struct gsm_network;
+struct vlr_subscr;
+
+#define MSC_HLR_REMOTE_IP_DEFAULT "127.0.0.1"
+#define MSC_HLR_REMOTE_PORT_DEFAULT OSMO_GSUP_PORT
+
+enum msc_debug_categories {
+   DRLL,
+   DCC,
+   DMM,
+   DRR,
+   DMNCC,
+   DPAG,
+   DMSC,
+   DMGCP,
+   DHO,
+   DDB,
+   DREF,
+   DCTRL,
+   

Change in osmo-msc[master]: rename gsm_subscriber_connection to ran_conn

2018-11-29 Thread Neels Hofmeyr
Hello Vadim Yanitskiy, Jenkins Builder,

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

https://gerrit.osmocom.org/12015

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

Change subject: rename gsm_subscriber_connection to ran_conn
..

rename gsm_subscriber_connection to ran_conn

In preparation for inter-BSC and inter-MSC handover, we need to separate the
subscriber management logic from the actual RAN connections. What better time
to finally rename gsm_subscriber_connection.

* Name choice:

In 2G, this is a connection to the BSS, but even though 3GPP TS commonly talk
of "BSS-A" and "BSS-B" when explaining handover, it's not good to call it
"bss_conn": in 3G a BSS is called RNS, IIUC.

The overall term for 2G (GERAN) and 3G (UTRAN) is RAN: Radio Access Network.

* Rationale:

A subscriber in the MSC so far has only one RAN connection, but e.g. for
inter-BSC handover, a second one needs to be created to handover to. Most of
the items in the former gsm_subscriber_connection are actually related to the
RAN, with only a few MM and RTP related items. So, as a first step, just rename
it to ran_conn, to cosmetically prepare for moving the not strictly RAN related
items away later.

Also:

- Rename some functions from msc_subscr_conn_* to ran_conn_*
- Rename "Subscr_Conn" FSM instance name to "RAN_conn"
- Rename SUBSCR_CONN_* to RAN_CONN_*

Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
---
M include/osmocom/msc/a_iface.h
M include/osmocom/msc/gsm_04_08.h
M include/osmocom/msc/gsm_04_11.h
M include/osmocom/msc/gsm_04_14.h
M include/osmocom/msc/gsm_04_80.h
M include/osmocom/msc/gsm_09_11.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/iucs.h
M include/osmocom/msc/msc_ifaces.h
M include/osmocom/msc/msc_mgcp.h
M include/osmocom/msc/osmo_msc.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/transaction.h
M include/osmocom/msc/vlr.h
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/msc_ifaces.c
M src/libmsc/msc_mgcp.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/subscr_conn.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/osmo-msc/msc_main.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
57 files changed, 3,843 insertions(+), 3,846 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/15/12015/4
--
To view, visit https://gerrit.osmocom.org/12015
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
Gerrit-Change-Number: 12015
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: drop unused gsm_subscr_conn->mncc_rtp_bridge

2018-11-29 Thread Neels Hofmeyr
Hello Vadim Yanitskiy, Jenkins Builder,

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

https://gerrit.osmocom.org/12013

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

Change subject: drop unused gsm_subscr_conn->mncc_rtp_bridge
..

drop unused gsm_subscr_conn->mncc_rtp_bridge

Change-Id: I322dc18cfe2cc573744261df837e719b5cf224ba
---
M include/osmocom/msc/gsm_data.h
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/mncc_builtin.c
3 files changed, 1 insertion(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/13/12013/2
--
To view, visit https://gerrit.osmocom.org/12013
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I322dc18cfe2cc573744261df837e719b5cf224ba
Gerrit-Change-Number: 12013
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-msc[master]: rename gsm_subscriber_connection to ran_conn

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12015 )

Change subject: rename gsm_subscriber_connection to ran_conn
..


Patch Set 3: Code-Review+1

I definitely like this. The old 'gsm_subscriber_connection'
makes function declarations / definitions look awkward :Ж


--
To view, visit https://gerrit.osmocom.org/12015
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
Gerrit-Change-Number: 12015
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 01:38:45 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: drop unused gsm_subscriber_connection->encr

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12016 )

Change subject: drop unused gsm_subscriber_connection->encr
..


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/12016/2/src/libmsc/msc_vty.c
File src/libmsc/msc_vty.c:

https://gerrit.osmocom.org/#/c/12016/2/src/libmsc/msc_vty.c@a488
PS2, Line 488:
This should be corrected too.



--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 01:35:30 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: cosmetic: subscr_conn_fsm_auth_ciph() should be static

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12021 )

Change subject: cosmetic: subscr_conn_fsm_auth_ciph() should be static
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/12021
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaa2c63d2b06f59d34e0465c40a98741f56ec526a
Gerrit-Change-Number: 12021
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 01:33:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-hlr[master]: SS/USSD: fix: properly (re)schedule SS session timeout

2018-11-29 Thread Vadim Yanitskiy
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/12022

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

Change subject: SS/USSD: fix: properly (re)schedule SS session timeout
..

SS/USSD: fix: properly (re)schedule SS session timeout

It may happen that either the MS or an ESME would become
unresponsive, e.g. due to a bug, or a dropped message. This
is why we have SS session timeout, that prevents keeping
'stalled' sessions forever.

For some reason, it wasn't properly resceduled in case of any
SS/USSD activity, so the lifetime of a session was limited to
hard-coded 30 seconds.

Let's introduce a VTY option, which can be used to configure
the timer (by default it's set to 30 seconds):

hlr
  ...
  ! Use 0 to disable this timer
  ss-guard-timeout 30

and properly (re)schedule it.

Change-Id: I00561c7aa692b19f85692e11f83ffc1826023120
Related: OS#3717
---
M src/hlr.c
M src/hlr.h
M src/hlr_ussd.c
M src/hlr_vty.c
M tests/test_nodes.vty
5 files changed, 36 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/22/12022/3
--
To view, visit https://gerrit.osmocom.org/12022
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I00561c7aa692b19f85692e11f83ffc1826023120
Gerrit-Change-Number: 12022
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: libmsc/gsm_09_11.c: implement guard timer for SS sessions

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11992 )

Change subject: libmsc/gsm_09_11.c: implement guard timer for SS sessions
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/11992
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icf4d87c45e90324764073e8230e0fb9cb96dd9cb
Gerrit-Change-Number: 11992
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 01:22:32 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-hlr[master]: SS/USSD: release IUSE sessions immediately after response

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12023


Change subject: SS/USSD: release IUSE sessions immediately after response
..

SS/USSD: release IUSE sessions immediately after response

At the moment, all available IUSE handlers do assume a single
request-response operation, e.g. MS requests its MSISDN - IUSE
responds. No further nor intermediate communications is required.

Let's immediately terminate such SS sessions in order to avoid
waiting for the session inactivity watchdog (i.e. timeout).

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



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/23/12023/1

diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index 6ba1dcc..f9119d7 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -458,6 +458,8 @@
} else {
/* Handle internally */
ss->u.iuse->handle_ussd(conn, ss, gsup, req);
+   /* Release session immediately */
+   ss_session_free(ss);
}
}


--
To view, visit https://gerrit.osmocom.org/12023
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaefe37512da79e10fbe92378236bfff0eae0f8b9
Gerrit-Change-Number: 12023
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy 


Change in osmo-hlr[master]: SS/USSD: fix: properly (re)schedule SS session timeout

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12022 )

Change subject: SS/USSD: fix: properly (re)schedule SS session timeout
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/12022
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I00561c7aa692b19f85692e11f83ffc1826023120
Gerrit-Change-Number: 12022
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Fri, 30 Nov 2018 01:20:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-msc[master]: libmsc/gsm_09_11.c: implement guard timer for SS sessions

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/11992 )

Change subject: libmsc/gsm_09_11.c: implement guard timer for SS sessions
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/11992/3//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/11992/3//COMMIT_MSG@18
PS3, Line 18: the timer expires after 120 seconds
I think it's quite big value. Maybe, 30 seconds is better?



--
To view, visit https://gerrit.osmocom.org/11992
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Icf4d87c45e90324764073e8230e0fb9cb96dd9cb
Gerrit-Change-Number: 11992
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Fri, 30 Nov 2018 01:02:22 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-hlr[master]: SS/USSD: fix: properly (re)schedule SS session timeout

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has uploaded this change for review. ( 
https://gerrit.osmocom.org/12022


Change subject: SS/USSD: fix: properly (re)schedule SS session timeout
..

SS/USSD: fix: properly (re)schedule SS session timeout

It may happen that either the MS or an ESME would become
unresponsive, e.g. due to a bug, or a dropped message. This
is why we have SS session timeout, that prevents keeping
'stalled' sessions forever.

For some reason, it wasn't properly resceduled in case of any
SS/USSD activity, so the lifetime of a session was limited to
hard-coded 30 seconds.

Let's introduce a VTY option, which can be used to configure
the timer (by default it is 120 seconds now):

hlr
  ...
  ! Use 0 to disable this timer
  ss-guard-timeout 120

and properly (re)schedule it.

Change-Id: I00561c7aa692b19f85692e11f83ffc1826023120
Related: OS#3717
---
M src/hlr.c
M src/hlr.h
M src/hlr_ussd.c
M src/hlr_vty.c
M tests/test_nodes.vty
5 files changed, 36 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/22/12022/1

diff --git a/src/hlr.c b/src/hlr.c
index 78d6c91..9f1b907 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -604,6 +604,9 @@
INIT_LLIST_HEAD(_hlr->ss_sessions);
INIT_LLIST_HEAD(_hlr->ussd_routes);

+   /* Default SS guard timeout is 120 (i.e. 2 mins) */
+   g_hlr->ss_guard_timeout = 120;
+
rc = osmo_init_logging2(hlr_ctx, _log_info);
if (rc < 0) {
fprintf(stderr, "Error initializing logging\n");
diff --git a/src/hlr.h b/src/hlr.h
index 315c3dd..5236356 100644
--- a/src/hlr.h
+++ b/src/hlr.h
@@ -45,6 +45,9 @@
struct hlr_euse *euse_default;
struct llist_head iuse_list;

+   /* SS session guard timer value */
+   int ss_guard_timeout;
+
struct llist_head ussd_routes;

struct llist_head ss_sessions;
diff --git a/src/hlr_ussd.c b/src/hlr_ussd.c
index ba373f3..6ba1dcc 100644
--- a/src/hlr_ussd.c
+++ b/src/hlr_ussd.c
@@ -1,6 +1,7 @@
 /* OsmoHLR SS/USSD implementation */

 /* (C) 2018 Harald Welte 
+ * (C) 2018 by Vadim Yanitskiy 
  *
  * All Rights Reserved
  *
@@ -208,11 +209,13 @@

OSMO_STRLCPY_ARRAY(ss->imsi, imsi);
ss->session_id = session_id;
+
+   /* Schedule self-destruction timer */
osmo_timer_setup(>timeout, ss_session_timeout, ss);
-   /* NOTE: The timeout is currently global and not refreshed with 
subsequent messages
-* within the SS/USSD session.  So 30s after the initial SS message, 
the session will
-* timeout! */
-   osmo_timer_schedule(>timeout, 30, 0);
+   if (g_hlr->ss_guard_timeout > 0) {
+   osmo_timer_schedule(>timeout,
+   g_hlr->ss_guard_timeout, 0);
+   }

llist_add_tail(>list, >ss_sessions);
return ss;
@@ -535,6 +538,13 @@
gsup->imsi, gsup->session_id);
goto out_err;
}
+
+   /* Reschedule self-destruction timer */
+   if (g_hlr->ss_guard_timeout > 0) {
+   osmo_timer_schedule(>timeout,
+   g_hlr->ss_guard_timeout, 0);
+   }
+
if (ss_op_is_ussd(req.opcode)) {
/* dispatch unstructured SS to routing */
handle_ussd(conn, ss, gsup, );
diff --git a/src/hlr_vty.c b/src/hlr_vty.c
index 2d9b929..be49113 100644
--- a/src/hlr_vty.c
+++ b/src/hlr_vty.c
@@ -288,9 +288,22 @@
if (g_hlr->euse_default)
vty_out(vty, " ussd default-route external %s%s", 
g_hlr->euse_default->name, VTY_NEWLINE);

+   if (g_hlr->ss_guard_timeout > 0)
+   vty_out(vty, " ss-guard-timeout %i%s",
+   g_hlr->ss_guard_timeout, VTY_NEWLINE);
+
return 0;
 }

+DEFUN(cfg_ss_guard_timeout, cfg_ss_guard_timeout_cmd,
+   "ss-guard-timeout <0-255>",
+   "Set guard timer for SS/USSD session activity\n"
+   "Guard timer value (sec.), or 0 to disable")
+{
+   g_hlr->ss_guard_timeout = atoi(argv[0]);
+   return CMD_SUCCESS;
+}
+
 /***
  * Common Code
  ***/
@@ -353,6 +366,7 @@
install_element(HLR_NODE, _ussd_no_route_pfx_cmd);
install_element(HLR_NODE, _ussd_defaultroute_cmd);
install_element(HLR_NODE, _ussd_no_defaultroute_cmd);
+   install_element(HLR_NODE, _ss_guard_timeout_cmd);

hlr_vty_subscriber_init();
 }
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index a9d4ac4..88ee5fb 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -77,6 +77,7 @@
   no ussd route prefix PREFIX
   ussd default-route external EUSE
   no ussd default-route
+  ss-guard-timeout <0-255>

 OsmoHLR(config-hlr)# gsup
 OsmoHLR(config-hlr-gsup)# list
@@ -118,4 +119,5 @@
   

Change in osmo-msc[master]: rename gsm_subscriber_connection to ran_conn

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12015

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

Change subject: rename gsm_subscriber_connection to ran_conn
..

rename gsm_subscriber_connection to ran_conn

In preparation for inter-BSC and inter-MSC handover, we need to separate the
subscriber management logic from the actual RAN connections. What better time
to finally rename gsm_subscriber_connection.

* Name choice:

In 2G, this is a connection to the BSS, but even though 3GPP TS commonly talk
of "BSS-A" and "BSS-B" when explaining handover, it's not good to call it
"bss_conn": in 3G a BSS is called RNS, IIUC.

The overall term for 2G (GERAN) and 3G (UTRAN) is RAN: Radio Access Network.

* Rationale:

A subscriber in the MSC so far has only one RAN connection, but e.g. for
inter-BSC handover, a second one needs to be created to handover to. Most of
the items in the former gsm_subscriber_connection are actually related to the
RAN, with only a few MM and RTP related items. So, as a first step, just rename
it to ran_conn, to cosmetically prepare for moving the not strictly RAN related
items away later.

Also:

- Rename some functions from msc_subscr_conn_* to ran_conn_*
- Rename "Subscr_Conn" FSM instance name to "RAN_conn"
- Rename SUBSCR_CONN_* to RAN_CONN_*

Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
---
M include/osmocom/msc/a_iface.h
M include/osmocom/msc/gsm_04_08.h
M include/osmocom/msc/gsm_04_11.h
M include/osmocom/msc/gsm_04_14.h
M include/osmocom/msc/gsm_04_80.h
M include/osmocom/msc/gsm_09_11.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/iucs.h
M include/osmocom/msc/msc_ifaces.h
M include/osmocom/msc/msc_mgcp.h
M include/osmocom/msc/osmo_msc.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/transaction.h
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/msc_ifaces.c
M src/libmsc/msc_mgcp.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/subscr_conn.c
M src/libmsc/transaction.c
M src/libvlr/vlr.c
M src/osmo-msc/msc_main.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
56 files changed, 3,652 insertions(+), 3,655 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/15/12015/3
--
To view, visit https://gerrit.osmocom.org/12015
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
Gerrit-Change-Number: 12015
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: cosmetic: subscr_conn_fsm_auth_ciph() should be static

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12021


Change subject: cosmetic: subscr_conn_fsm_auth_ciph() should be static
..

cosmetic: subscr_conn_fsm_auth_ciph() should be static

Only used in subscr_conn.c.

Change-Id: Iaa2c63d2b06f59d34e0465c40a98741f56ec526a
---
M src/libmsc/subscr_conn.c
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/src/libmsc/subscr_conn.c b/src/libmsc/subscr_conn.c
index e6fa7e1..854b380 100644
--- a/src/libmsc/subscr_conn.c
+++ b/src/libmsc/subscr_conn.c
@@ -137,7 +137,7 @@
}
 }

-void subscr_conn_fsm_auth_ciph(struct osmo_fsm_inst *fi, uint32_t event, void 
*data)
+static void subscr_conn_fsm_auth_ciph(struct osmo_fsm_inst *fi, uint32_t 
event, void *data)
 {
/* If accepted, transition the state, all other cases mean failure. */
switch (event) {

--
To view, visit https://gerrit.osmocom.org/12021
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: drop unused gsm_subscriber_connection->encr

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12016

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

Change subject: drop unused gsm_subscriber_connection->encr
..

drop unused gsm_subscriber_connection->encr

The gsm_subscriber_connection->encr is never used. Drop completely.
Drop the definition of struct gsm_encr from common_cs.h.
Do not print the encr.alg_id in vty_dump_one_conn(), it always was zero anyway.

Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
---
M include/osmocom/msc/common_cs.h
M include/osmocom/msc/gsm_data.h
M src/libmsc/msc_vty.c
3 files changed, 1 insertion(+), 13 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/16/12016/2
--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
Gerrit-Change-Number: 12016
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-msc[master]: rename gsm_subscriber_connection to ran_conn

2018-11-29 Thread Neels Hofmeyr
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/12015

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

Change subject: rename gsm_subscriber_connection to ran_conn
..

rename gsm_subscriber_connection to ran_conn

In preparation for inter-BSC and inter-MSC handover, we need to separate the
subscriber management logic from the actual RAN connections. What better time
to finally rename gsm_subscriber_connection.

* Name choice:

In 2G, this is a connection to the BSS, but even though 3GPP TS commonly talk
of "BSS-A" and "BSS-B" when explaining handover, it's not good to call it
"bss_conn": in 3G a BSS is called RNS, IIUC.

The overall term for 2G (GERAN) and 3G (UTRAN) is RAN: Radio Access Network.

* Rationale:

A subscriber in the MSC so far has only one RAN connection, but e.g. for
inter-BSC handover, a second one needs to be created to handover to. Most of
the items in the former gsm_subscriber_connection are actually related to the
RAN, with only a few MM and RTP related items. So, as a first step, just rename
it to ran_conn, to cosmetically prepare for moving the not strictly RAN related
items away later.

Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
---
M include/osmocom/msc/a_iface.h
M include/osmocom/msc/gsm_04_08.h
M include/osmocom/msc/gsm_04_11.h
M include/osmocom/msc/gsm_04_14.h
M include/osmocom/msc/gsm_04_80.h
M include/osmocom/msc/gsm_09_11.h
M include/osmocom/msc/gsm_data.h
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/iucs.h
M include/osmocom/msc/msc_ifaces.h
M include/osmocom/msc/msc_mgcp.h
M include/osmocom/msc/osmo_msc.h
M include/osmocom/msc/signal.h
M include/osmocom/msc/silent_call.h
M include/osmocom/msc/transaction.h
M src/libmsc/a_iface.c
M src/libmsc/a_iface_bssap.c
M src/libmsc/gsm_04_08.c
M src/libmsc/gsm_04_08_cc.c
M src/libmsc/gsm_04_11.c
M src/libmsc/gsm_04_14.c
M src/libmsc/gsm_04_80.c
M src/libmsc/gsm_09_11.c
M src/libmsc/gsm_subscriber.c
M src/libmsc/iucs.c
M src/libmsc/iucs_ranap.c
M src/libmsc/msc_ifaces.c
M src/libmsc/msc_mgcp.c
M src/libmsc/msc_vty.c
M src/libmsc/osmo_msc.c
M src/libmsc/rrlp.c
M src/libmsc/silent_call.c
M src/libmsc/smpp_openbsc.c
M src/libmsc/smpp_smsc.h
M src/libmsc/subscr_conn.c
M src/libmsc/transaction.c
M tests/msc_vlr/msc_vlr_test_authen_reuse.err
M tests/msc_vlr/msc_vlr_test_call.err
M tests/msc_vlr/msc_vlr_test_gsm_authen.err
M tests/msc_vlr/msc_vlr_test_gsm_ciph.err
M tests/msc_vlr/msc_vlr_test_hlr_reject.err
M tests/msc_vlr/msc_vlr_test_hlr_timeout.c
M tests/msc_vlr/msc_vlr_test_hlr_timeout.err
M tests/msc_vlr/msc_vlr_test_ms_timeout.c
M tests/msc_vlr/msc_vlr_test_ms_timeout.err
M tests/msc_vlr/msc_vlr_test_no_authen.err
M tests/msc_vlr/msc_vlr_test_reject_concurrency.c
M tests/msc_vlr/msc_vlr_test_reject_concurrency.err
M tests/msc_vlr/msc_vlr_test_rest.c
M tests/msc_vlr/msc_vlr_test_rest.err
M tests/msc_vlr/msc_vlr_test_ss.err
M tests/msc_vlr/msc_vlr_test_umts_authen.err
M tests/msc_vlr/msc_vlr_tests.c
M tests/msc_vlr/msc_vlr_tests.h
54 files changed, 3,167 insertions(+), 3,167 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/15/12015/2
--
To view, visit https://gerrit.osmocom.org/12015
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic595f7a558d3553c067f77dc67543ab59659707a
Gerrit-Change-Number: 12015
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in libosmocore[master]: LCLS, TS 29.205: add GCR routines

2018-11-29 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11827 )

Change subject: LCLS, TS 29.205: add GCR routines
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/11827
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iee95aa4e5c056645b6cb5667e4a067097d52dfbf
Gerrit-Change-Number: 11827
Gerrit-PatchSet: 9
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 22:48:06 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: LCLS: add gsm0808_create_ass_ext()

2018-11-29 Thread Max
Max has posted comments on this change. ( https://gerrit.osmocom.org/11826 )

Change subject: LCLS: add gsm0808_create_ass_ext()
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/11826
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id89765df3f8c12f55f73f1d7a9d90c8883eb3bba
Gerrit-Change-Number: 11826
Gerrit-PatchSet: 12
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 29 Nov 2018 22:48:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in libosmocore[master]: LCLS: fix GCR parameter name

2018-11-29 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12019


Change subject: LCLS: fix GCR parameter name
..

LCLS: fix GCR parameter name

* use proper struct pointer
* update comments to be useful for doxygen

Change-Id: I8ccfbd0c146e462e599e5305520cc89602364ec3
---
M include/osmocom/gsm/gsm0808_utils.h
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/12019/1

diff --git a/include/osmocom/gsm/gsm0808_utils.h 
b/include/osmocom/gsm/gsm0808_utils.h
index c5bf280..57aa6ea 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -60,10 +60,10 @@

 /*! LCLS-related parameters from 3GPP TS 48.008 */
 struct osmo_lcls {
-   enum gsm0808_lcls_config config;   /* §3.2.2.116 Configuration */
-   enum gsm0808_lcls_control control; /* §3.2.2.117 Connection Status 
Control */
-   struct gsm0808_gcr *gcr;   /* §3.2.2.115 Global Call Reference 
*/
-   bool corr_needed;  /* §3.2.2.118 Correlation-Not-Needed 
*/
+   enum gsm0808_lcls_config config;   /*< doc  §3.2.2.116 Configuration */
+   enum gsm0808_lcls_control control; /*< doc  §3.2.2.117 Connection 
Status Control */
+   struct gsm29205_gcr *gcr;  /*< doc  §3.2.2.115 Global Call 
Reference */
+   bool corr_needed;  /*< doc  §3.2.2.118 
Correlation-Not-Needed */
 };

 extern const struct value_string gsm0808_cell_id_discr_names[];

--
To view, visit https://gerrit.osmocom.org/12019
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ccfbd0c146e462e599e5305520cc89602364ec3
Gerrit-Change-Number: 12019
Gerrit-PatchSet: 1
Gerrit-Owner: Max 


Change in libosmocore[master]: LCLS, TS 48.008: add GCR IE encoding/decoding

2018-11-29 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12020


Change subject: LCLS, TS 48.008: add GCR IE encoding/decoding
..

LCLS, TS 48.008: add GCR IE encoding/decoding

* add functions to encode Global Call. Ref. from TS 29.205 as 3GPP TS
  48.008 §3.2.2.115 information element
* add corresponding tests

Change-Id: I82ce0207dc8de50689a8806c6471ad7fbae6219d
---
M include/osmocom/gsm/gsm0808_utils.h
M src/gsm/gsm0808_utils.c
M src/gsm/libosmogsm.map
M tests/gsm0808/gsm0808_test.c
M tests/gsm0808/gsm0808_test.ok
5 files changed, 103 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/20/12020/1

diff --git a/include/osmocom/gsm/gsm0808_utils.h 
b/include/osmocom/gsm/gsm0808_utils.h
index 57aa6ea..5de0d9d 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -81,6 +81,10 @@
const struct sockaddr_storage *ss);
 int gsm0808_dec_aoip_trasp_addr(struct sockaddr_storage *ss,
const uint8_t *elem, uint8_t len);
+
+uint8_t gsm0808_enc_gcr(struct msgb *msg,  const struct gsm29205_gcr *g);
+int gsm0808_dec_gcr(struct gsm29205_gcr *g, struct tlv_parsed *tp);
+
 uint8_t gsm0808_enc_speech_codec(struct msgb *msg,
 const struct gsm0808_speech_codec *sc);
 int gsm0808_dec_speech_codec(struct gsm0808_speech_codec *sc,
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index c58d828..9f7ec7e 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -482,6 +482,42 @@
return (int)(elem - old_elem);
 }

+/*! Create BSSMAP Global Call Reference, 3GPP TS 48.008 §3.2.2.115
+ *  \param[out] msg Message Buffer for appending IE
+ *  \param[in] g Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1
+ *  \returns number of bytes added to \a msg or 0 on error */
+uint8_t gsm0808_enc_gcr(struct msgb *msg, const struct gsm29205_gcr *g)
+{
+   uint8_t enc, *len;
+
+   len = msgb_v_put(msg, GSM0808_IE_GLOBAL_CALL_REF);
+
+   /* reserve space for length */
+   msgb_v_put(msg, 0); /* len points to this reserved space already */
+
+   enc = gsm29205_enc_gcr(msg, g);
+   if (enc) {
+   len[0] = enc;
+   return enc + 2; /* type (1 byte) + length (1 byte) */
+   }
+
+   return 0;
+}
+
+/*! Decode BSSMAP Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1
+ *  \param[out] gcr Caller-provided memory to store Global Call Reference
+ *  \param[in] elem IE value to be decoded
+ *  \param[in] len Length of \a elem in bytes
+ *  \returns number of bytes parsed; negative on error */
+int gsm0808_dec_gcr(struct gsm29205_gcr *gcr, struct tlv_parsed *tp)
+{
+   const uint8_t *buf = TLVP_VAL_MINLEN(tp, GSM0808_IE_GLOBAL_CALL_REF, 
OSMO_GCR_MIN_LEN);
+   if (!buf)
+   return -EINVAL;
+
+   return 2 + gsm29205_dec_gcr(gcr, buf, TLVP_LEN(tp, 
GSM0808_IE_GLOBAL_CALL_REF));
+}
+
 /*! Encode TS 08.08 Encryption Information IE
  *  \param[out] msg Message Buffer to which IE is to be appended
  *  \param[in] ei Encryption Information to be encoded
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index e1012b2..390b546 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -146,6 +146,8 @@

 gsm29205_enc_gcr;
 gsm29205_dec_gcr;
+gsm0808_enc_gcr;
+gsm0808_dec_gcr;

 gsm0808_att_tlvdef;
 gsm0808_bssap_name;
diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c
index 197ec06..e428970 100644
--- a/tests/gsm0808/gsm0808_test.c
+++ b/tests/gsm0808/gsm0808_test.c
@@ -569,6 +569,61 @@
msgb_free(in_msg);
 }

+static void test_enc_dec_gcr()
+{
+   static const uint8_t res[] = {
+   GSM0808_IE_GLOBAL_CALL_REF,
+   0x0d, /* GCR length */
+   0x03, /* .net_len */
+   0x4f, 0x4f, 0x4f, /* .net */
+   0x02, /* .node length */
+   0xde, 0xad, /* .node */
+   0x05, /* length of Call. Ref. */
+   0x4e, 0x4e, 0x4e, 0x4e, 0x4e /* .cr - Call. Ref. */
+   };
+   uint8_t len;
+   struct msgb *msg;
+   struct gsm29205_gcr g = { .net_len = 3, .node = 0xDEAD }, p = { 0 };
+   int rc;
+   struct tlv_parsed tp;
+   msg = msgb_alloc_headroom(BSSMAP_MSG_SIZE, BSSMAP_MSG_HEADROOM, "global 
call reference");
+   if (!msg)
+   return;
+
+   memset(g.cr, 'N', sizeof(g.cr));
+   memset(g.net, 'O', g.net_len);
+
+   len = gsm0808_enc_gcr(msg, );
+   printf("Testing Global Call Reference IE encoder...\n\t%d bytes added: 
%s\n",
+  len, len == ARRAY_SIZE(res) ? "OK" : "FAIL");
+
+   if (!msgb_cmpr(__func__, __LINE__, msg, res, ARRAY_SIZE(res), true))
+   abort();
+
+   rc = osmo_bssap_tlv_parse(, msgb_data(msg), msgb_length(msg));
+   if (rc < 0)
+   

Change in libosmocore[master]: msgb: add test helper

2018-11-29 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12017


Change subject: msgb: add test helper
..

msgb: add test helper

It's often handy to compare msgb to a given array and print the position
where they differ.

Change-Id: I3bc95f2f5ab6e3f4b502647fb3e0aaaf1f7c4cf5
---
M include/osmocom/core/msgb.h
M src/msgb.c
2 files changed, 83 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/12017/1

diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h
index 2449151..6e344f1 100644
--- a/include/osmocom/core/msgb.h
+++ b/include/osmocom/core/msgb.h
@@ -565,6 +565,8 @@
 void *msgb_talloc_ctx_init(void *root_ctx, unsigned int pool_size);
 void msgb_set_talloc_ctx(void *ctx) OSMO_DEPRECATED("Use 
msgb_talloc_ctx_init() instead");
 int msgb_printf(struct msgb *msgb, const char *format, ...);
+bool msgb_cmpr_l3(const char *f, size_t l, const struct msgb *msg, const 
uint8_t *data, size_t len, bool print);
+bool msgb_cmpr(const char *f, size_t l, const struct msgb *msg, const uint8_t 
*data, size_t len, bool print);

 static inline const char *msgb_hexdump_l2(const struct msgb *msg)
 {
diff --git a/src/msgb.c b/src/msgb.c
index 844cfc6..ebecc3e 100644
--- a/src/msgb.c
+++ b/src/msgb.c
@@ -173,6 +173,87 @@
return msg->data;
 }

+static inline bool compare_n_print(const char *f, size_t l, uint8_t level,
+  const uint8_t *m, const uint8_t *d, size_t 
len, bool print)
+{
+   size_t i;
+   if (memcmp(m, d, len) == 0)
+   return true;
+
+   if (!print)
+   return false;
+
+   printf("%s:%zu L%u data mismatch:\nexpected %s\n ",
+  f, l, level, osmo_hexdump(d, len));
+
+   for(i = 0; i < len; i++)
+   if (d[i] != m[i]) {
+   printf("!!\n");
+   break;
+   } else
+   printf(".. ");
+
+   /* N. B: that's intended to be used bymsgb_cmpr*() so length check is 
already passed,
+  so we can use len for both m and d */
+   printf("msgb %s\n", osmo_hexdump(m, len));
+
+   return false;
+}
+
+/*! Compare and print: check L3 data in msgb against given data and print 
erros if any
+ *  \param[in] f text prefix, usually __func__, ignored if print == false
+ *  \param[in] l numeric prefix, usually __LINE__, ignored if print == false
+ *  \param[in] msg message buffer
+ *  \param[in] data expected L3 data
+ *  \param[in] len length of data
+ *  \param[in] print boolean indicating whether we should print anything to 
stdout
+ *  \returns boolean indicating whether msgb L3 content is equal to a given 
data
+ */
+bool msgb_cmpr_l3(const char *f, size_t l, const struct msgb *msg, const 
uint8_t *data, size_t len, bool print)
+{
+   if (!msg) {
+   if (print)
+   printf("%s:%zu NULL msg comparison\n", f, l);
+   return false;
+   }
+
+   if (msgb_l3len(msg) != len) {
+   if (print)
+   printf("%s:%zu Length mismatch: %d != %zu, %s\n",
+  f, l, msgb_l3len(msg), len, 
msgb_hexdump_l3(msg));
+   return false;
+   }
+
+   return compare_n_print(f, l, 3, msgb_l3(msg), data, len, print);
+}
+
+/*! Compare and print: check data in msgb against given data and print erros 
if any
+ *  \param[in] f text prefix, usually __func__, ignored if print == false
+ *  \param[in] l numeric prefix, usually __LINE__, ignored if print == false
+ *  \param[in] msg message buffer
+ *  \param[in] data expected data
+ *  \param[in] len length of data
+ *  \param[in] print boolean indicating whether we should print anything to 
stdout
+ *  \returns boolean indicating whether msgb content is equal to a given data
+ */
+bool msgb_cmpr(const char *f, size_t l, const struct msgb *msg, const uint8_t 
*data, size_t len, bool print)
+{
+   if (!msg) {
+   if (print)
+   printf("%s:%zu NULL msg comparison\n", f, l);
+   return false;
+   }
+
+   if (msgb_length(msg) != len) {
+   if (print)
+   printf("%s:%zu Length mismatch: %d != %zu, %s\n",
+  f, l, msgb_length(msg), len, msgb_hexdump(msg));
+   return false;
+   }
+
+   return compare_n_print(f, l, 0, msgb_data(msg), data, len, print);
+}
+
 /*! get length of message buffer
  *  \param[in] msg message buffer
  *  \returns length of data section in message buffer

--
To view, visit https://gerrit.osmocom.org/12017
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bc95f2f5ab6e3f4b502647fb3e0aaaf1f7c4cf5
Gerrit-Change-Number: 12017
Gerrit-PatchSet: 1

Change in libosmocore[master]: Move BSSMAP_MSG_* defines to header file

2018-11-29 Thread Max
Max has uploaded this change for review. ( https://gerrit.osmocom.org/12018


Change subject: Move BSSMAP_MSG_* defines to header file
..

Move BSSMAP_MSG_* defines to header file

Change-Id: I4d8cc05b8df8e70c1f6257e53ae3acec7901681f
---
M include/osmocom/gsm/gsm0808.h
M src/gsm/gsm0808.c
2 files changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/12018/1

diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index 9b19d69..298b3e4 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -29,6 +29,9 @@
 #include 
 #include 

+#define BSSMAP_MSG_SIZE 512
+#define BSSMAP_MSG_HEADROOM 128
+
 struct sockaddr_storage;

 struct msgb;
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index fe7bc2c..2566ad5 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -34,9 +34,6 @@
  *  message generation/encoding.
  */

-#define BSSMAP_MSG_SIZE 512
-#define BSSMAP_MSG_HEADROOM 128
-
 /*! Create "Complete L3 Info" for AoIP, legacy implementation.
  * Instead use gsm0808_create_layer3_aoip2(), which is capable of three-digit 
MNC with leading zeros.
  *  \param[in] msg_l3 msgb containing Layer 3 Message

--
To view, visit https://gerrit.osmocom.org/12018
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d8cc05b8df8e70c1f6257e53ae3acec7901681f
Gerrit-Change-Number: 12018
Gerrit-PatchSet: 1
Gerrit-Owner: Max 


Change in osmo-msc[master]: drop unused ran_conn->encr

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12016


Change subject: drop unused ran_conn->encr
..

drop unused ran_conn->encr

The ran_conn->encr is never used. Drop completely.
Drop the definition of struct gsm_encr from common_cs.h.
Do not print the encr.alg_id in vty_dump_one_conn(), it always was zero anyway.

Change-Id: Ice2c470c360612249f97301944c6fdf9443c7dce
---
M include/osmocom/msc/common_cs.h
M include/osmocom/msc/gsm_data.h
M src/libmsc/msc_vty.c
3 files changed, 1 insertion(+), 13 deletions(-)



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

diff --git a/include/osmocom/msc/common_cs.h b/include/osmocom/msc/common_cs.h
index fddc6ec..14fe618 100644
--- a/include/osmocom/msc/common_cs.h
+++ b/include/osmocom/msc/common_cs.h
@@ -1,18 +1,8 @@
 #pragma once

-#include 
-
 struct msgb;
 struct gsm_network;

 typedef int (*mncc_recv_cb_t)(struct gsm_network *, struct msgb *);

-#define MAX_A5_KEY_LEN (128/8)
-
-struct gsm_encr {
-   uint8_t alg_id;
-   uint8_t key_len;
-   uint8_t key[MAX_A5_KEY_LEN];
-};
-
 struct gsm_network *gsm_network_init(void *ctx, mncc_recv_cb_t mncc_recv);
diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 5c167e1..4a829bd 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -125,7 +125,6 @@
enum ran_type via_ran;

uint16_t lac;
-   struct gsm_encr encr;

/* "Temporary" storage for the case the VLR asked for Cipher Mode 
Command, but the MSC still
 * wants to request a Classmark Update first. */
diff --git a/src/libmsc/msc_vty.c b/src/libmsc/msc_vty.c
index 9c82713..ba042e5 100644
--- a/src/libmsc/msc_vty.c
+++ b/src/libmsc/msc_vty.c
@@ -491,7 +491,7 @@

 static void vty_dump_one_conn(struct vty *vty, const struct ran_conn *conn)
 {
-   vty_out(vty, "%08x %22s %3s %5u %3u %08x %c /%1u %27s %s",
+   vty_out(vty, "%08x %22s %3s %5u %3u %08x %c %27s %s",
conn->a.conn_id,
conn->vsub ? vlr_subscr_name(conn->vsub) : "-",
conn->via_ran == RAN_UTRAN_IU ? "Iu" : "A",
@@ -499,7 +499,6 @@
conn->use_count,
conn->use_tokens,
conn->received_cm_service_request ? 'C' : '-',
-   conn->encr.alg_id,
conn->fi ? osmo_fsm_inst_state_name(conn->fi) : "-",
VTY_NEWLINE);
 }

--
To view, visit https://gerrit.osmocom.org/12016
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: drop unused gsm_subscr_conn->mncc_rtp_bridge

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has posted comments on this change. ( 
https://gerrit.osmocom.org/12013 )

Change subject: drop unused gsm_subscr_conn->mncc_rtp_bridge
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/12013
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I322dc18cfe2cc573744261df837e719b5cf224ba
Gerrit-Change-Number: 12013
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 29 Nov 2018 22:31:04 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-msc[master]: drop unused gsm_network->handover.active

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12014


Change subject: drop unused gsm_network->handover.active
..

drop unused gsm_network->handover.active

gsm_network contains an int handover.active which is always zero. Drop it.

There is real handover code coming up soon, one part of this is to avoid
confusion.

The internal MNCC code queried it to decide whether to MNCC_BRIDGE or proxy RTP
(MNCC_FRAME_RECV). Since RTP is being handled by osmo-mgw since forever, drop
that entire condition from mncc_builtin.

Change-Id: Ie16e718266882588b38297121364ca0b7fdfe948
---
M include/osmocom/msc/gsm_data.h
M src/libmsc/mncc_builtin.c
2 files changed, 1 insertion(+), 18 deletions(-)



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

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 4d3a2e4..94a6ffd 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -283,9 +283,6 @@
uint8_t a5_encryption_mask;
bool authentication_required;
int send_mm_info;
-   struct {
-   int active;
-   } handover;

struct rate_ctr_group *msc_ctrs;
struct osmo_counter *active_calls;
diff --git a/src/libmsc/mncc_builtin.c b/src/libmsc/mncc_builtin.c
index d6f3e3d..2efab1f 100644
--- a/src/libmsc/mncc_builtin.c
+++ b/src/libmsc/mncc_builtin.c
@@ -189,21 +189,7 @@
bridge.callref[1] = call->remote_ref;
DEBUGP(DMNCC, "(call %x) Bridging with remote.\n", call->callref);

-   /* proxy mode */
-   if (!net->handover.active) {
-   /* in the no-handover case, we can bridge, i.e. use
-* the old RTP proxy code */
-   return mncc_tx_to_cc(call->net, MNCC_BRIDGE, );
-   } else {
-   /* in case of handover, we need to re-write the RTP
-* SSRC, sequence and timestamp values and thus
-* need to enable RTP receive for both directions */
-   memset(_recv, 0, sizeof(struct gsm_mncc));
-   frame_recv.callref = call->callref;
-   mncc_tx_to_cc(call->net, MNCC_FRAME_RECV, _recv);
-   frame_recv.callref = call->remote_ref;
-   return mncc_tx_to_cc(call->net, MNCC_FRAME_RECV, _recv);
-   }
+   return mncc_tx_to_cc(call->net, MNCC_BRIDGE, );
 }

 static int mncc_disc_ind(struct gsm_call *call, int msg_type,

--
To view, visit https://gerrit.osmocom.org/12014
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-msc[master]: drop unused gsm_subscr_conn->mncc_rtp_bridge

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
https://gerrit.osmocom.org/12013


Change subject: drop unused gsm_subscr_conn->mncc_rtp_bridge
..

drop unused gsm_subscr_conn->mncc_rtp_bridge

Change-Id: I322dc18cfe2cc573744261df837e719b5cf224ba
---
M include/osmocom/msc/gsm_data.h
M src/libmsc/gsm_04_08_cc.c
2 files changed, 0 insertions(+), 5 deletions(-)



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

diff --git a/include/osmocom/msc/gsm_data.h b/include/osmocom/msc/gsm_data.h
index 085248c..4d3a2e4 100644
--- a/include/osmocom/msc/gsm_data.h
+++ b/include/osmocom/msc/gsm_data.h
@@ -118,9 +118,6 @@
/* Are we part of a special "silent" call */
int silent_call;

-   /* MNCC rtp bridge markers */
-   int mncc_rtp_bridge;
-
/* back pointers */
struct gsm_network *network;

diff --git a/src/libmsc/gsm_04_08_cc.c b/src/libmsc/gsm_04_08_cc.c
index f9888d7..c9dffe3 100644
--- a/src/libmsc/gsm_04_08_cc.c
+++ b/src/libmsc/gsm_04_08_cc.c
@@ -1723,8 +1723,6 @@
return 0;
}

-   trans->conn->mncc_rtp_bridge = 1;
-
/* When we call msc_mgcp_call_assignment() we will trigger, depending
 * on the RAN type the call assignment on the A or Iu interface.
 * msc_mgcp_call_assignment() also takes care about sending the CRCX

--
To view, visit https://gerrit.osmocom.org/12013
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

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


Change in osmo-bsc[master]: follow-up: logging tweak for Immediate Assignment

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11942 )

Change subject: follow-up: logging tweak for Immediate Assignment
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/11942/1/src/osmo-bsc/lchan_fsm.c
File src/osmo-bsc/lchan_fsm.c:

https://gerrit.osmocom.org/#/c/11942/1/src/osmo-bsc/lchan_fsm.c@107
PS1, Line 107:   * (Timeout?) was already logged elsewhere. Just tear 
down the lchan. */
> You talk about tearing down the lchan here, but I don't see any code doing 
> that?
it's implicit after _lchan_on_activation_failure(). I mean, continue with the 
normal tear down stuff happening anyway, without sending some other message or 
logging.



--
To view, visit https://gerrit.osmocom.org/11942
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I474cf1a58d1f00ec5b0ae52bd095a60aad763975
Gerrit-Change-Number: 11942
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-CC: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:43:44 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in cellmgr-ng[master]: jenkins: use common osmo-build-dep.sh and osmo-clean-workspace.sh

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has abandoned this change. ( https://gerrit.osmocom.org/4588 )

Change subject: jenkins: use common osmo-build-dep.sh and 
osmo-clean-workspace.sh
..


Abandoned

obsoleted by a patch from pau, already merged
--
To view, visit https://gerrit.osmocom.org/4588
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: cellmgr-ng
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I4f5c2346f3b811c1550bf114e1692d33321118cc
Gerrit-Change-Number: 4588
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in osmo-bsc[master]: bsc: timelost_fsm: Remove unneeded set of out variable on failure

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11981 )

Change subject: bsc: timelost_fsm: Remove unneeded set of out variable on 
failure
..


Patch Set 2:

This patch isn't harmful even though I dislike it, and it's more like a 
personal preference. so I can't decide on a vote. In my heart, I want to vote 
-1.


--
To view, visit https://gerrit.osmocom.org/11981
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib8f9b7e1f584dee885d6823dc043682577572bd8
Gerrit-Change-Number: 11981
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:38:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bts[master]: bts-trx: (n)ack PDCH DEACT only after TRX answered SETSLOT

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11932 )

Change subject: bts-trx: (n)ack PDCH DEACT only after TRX answered SETSLOT
..


Patch Set 4: Code-Review+1

(2 comments)

(I won't pretend to know this code)

https://gerrit.osmocom.org/#/c/11932/4//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/11932/4//COMMIT_MSG@10
PS4, Line 10: into account if TRX succeeded or failed to set the TS:
are we talking bootstrapping the BTS in the beginning?


https://gerrit.osmocom.org/#/c/11932/4//COMMIT_MSG@32
PS4, Line 32: 20181123044720705 DTRX <000b> trx_if.c:492 Response message: 'RSP 
SETSLOT 0 6 1'
since you're posting a lot of logging in commit logs lately...

how about dropping the timestamp and the category-hex, instead adding the 
loglevel as explicit string, and either omitting the src line or putting it in 
the end?

 logging print level 1
 logging print category 1
 logging print category-hex 0
 logging print file basename last

(timestamp can be dropped by editor, like Ctrl-V in vim)



--
To view, visit https://gerrit.osmocom.org/11932
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I888de761b65c3ea8bfe623fcf009f3b2b57c926c
Gerrit-Change-Number: 11932
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:32:57 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: lchan_fsm: Add missing transition WAIT_TS_READY->WAIT_RLL_RTP_RE...

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11994 )

Change subject: bsc: lchan_fsm: Add missing transition 
WAIT_TS_READY->WAIT_RLL_RTP_RELEASED
..


Patch Set 2: Code-Review+2

ok, trying to figure out whether it makes sense:

In earlier code, the lchan started RTP only after the TS was ready.

Later on I tried to make it quicker to reduce a handover gap.
So now I see it already fires up the CRCX even before we know that an lchan has 
been activated.

So ok, yes, it makes sense to go to wait-for-RTP-release from wait_ts_ready.


--
To view, visit https://gerrit.osmocom.org/11994
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I43aab5ed8ac369869b191b3b7c938ce4985ab849
Gerrit-Change-Number: 11994
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:26:45 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: lchan_fsm: Fix invalid duplicated transition

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11996 )

Change subject: bsc: lchan_fsm: Fix invalid duplicated transition
..


Patch Set 2: Code-Review+2

(1 comment)

These are the reverberating release event avalanches that one typically gets 
when N components plugged together each need to tell all other components to 
tear down in case anything goes wrong. When writing, I merely was interested in 
being sure that each component *does* signal a release to the others and that a 
repeated event is not harmful. If you figured out how, then fine with me to 
make the log a bit shorter, too.

https://gerrit.osmocom.org/#/c/11996/2/src/osmo-bsc/lchan_fsm.c
File src/osmo-bsc/lchan_fsm.c:

https://gerrit.osmocom.org/#/c/11996/2/src/osmo-bsc/lchan_fsm.c@988
PS2, Line 988:  if (!sapis && !lchan->fi_rtp && fi->state == 
LCHAN_ST_WAIT_RLL_RTP_RELEASED)
maybe rather "&& fi->state != LCHAN_ST_WAIT_BEFORE_RF_RELEASE"?

ok, thinking, if it already went to some error state for whatever weird reasons 
we shouldn't transition back... yeah ok.

(I often have a desire to trigger a state transition only if it differs from 
the current state. Was thinking to add osmo_fsm_ API for this)



--
To view, visit https://gerrit.osmocom.org/11996
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d95bbd8244cc8e9c1cfb6fe0f76148332386a3d
Gerrit-Change-Number: 11996
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:20:33 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: timeslot_fsm: Fix count in ts_lchans_waiting

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11983 )

Change subject: bsc: timeslot_fsm: Fix count in ts_lchans_waiting
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11983
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I32008859cc23cd2afddd79daae21497d0945fed0
Gerrit-Change-Number: 11983
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:15:04 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: lchan_rtp_fsm: Avoid duplicate LCHAN_EV_RTP_RELEASED event

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11993 )

Change subject: bsc: lchan_rtp_fsm: Avoid duplicate LCHAN_EV_RTP_RELEASED event
..


Patch Set 2: Code-Review+2

(1 comment)

true. I actually forgot about the parent/child FSM relation that already takes 
care of a term event...

https://gerrit.osmocom.org/#/c/11993/2/src/osmo-bsc/lchan_rtp_fsm.c
File src/osmo-bsc/lchan_rtp_fsm.c:

https://gerrit.osmocom.org/#/c/11993/2/src/osmo-bsc/lchan_rtp_fsm.c@743
PS2, Line 743:   * configured at osmo_fsm_inst_alloc_child() time immediatelly 
after
(immediately)



--
To view, visit https://gerrit.osmocom.org/11993
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3e95a21e5a5ec6c35b1ab20b7a642fd7eb81e556
Gerrit-Change-Number: 11993
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:14:37 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: timeslot_fsm: Fix possible skip of some lchans in ts_terminate_l...

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11982 )

Change subject: bsc: timeslot_fsm: Fix possible skip of some lchans in 
ts_terminate_lchan_fsms
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11982
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9dc2a6e5b15376d049bd2ac5ddfa24340771b5c8
Gerrit-Change-Number: 11982
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:08:14 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: timeslot_fsm: Fix ts_is_lchan_waiting_for_pchan

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11954 )

Change subject: bsc: timeslot_fsm: Fix ts_is_lchan_waiting_for_pchan
..


Patch Set 5: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/11954/5/src/osmo-bsc/timeslot_fsm.c
File src/osmo-bsc/timeslot_fsm.c:

https://gerrit.osmocom.org/#/c/11954/5/src/osmo-bsc/timeslot_fsm.c@894
PS5, Line 894:  return true;
Don't drop below 'case'. Imagine an lchan requested to be set up, then the conn 
failed or what, and the lchan is gone again. Then the TS is already busy 
switching, and must complete that dance. It will likely go right back to PDCH 
once it reached the unused state, but so far it is actually switching to NONE. 
It's an obscure case, but don't assume that it never happens.



--
To view, visit https://gerrit.osmocom.org/11954
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib03e5a91438a5b74a04e69f81fab565842b02b66
Gerrit-Change-Number: 11954
Gerrit-PatchSet: 5
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Harald Welte 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:06:58 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: timelost_fsm: Remove unneeded set of out variable on failure

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11981 )

Change subject: bsc: timelost_fsm: Remove unneeded set of out variable on 
failure
..


Patch Set 2:

(1 comment)

I'd rather omit this patch, because...

https://gerrit.osmocom.org/#/c/11981/2/src/osmo-bsc/timeslot_fsm.c
File src/osmo-bsc/timeslot_fsm.c:

https://gerrit.osmocom.org/#/c/11981/2/src/osmo-bsc/timeslot_fsm.c@867
PS2, Line 867:  return false;
my idea here was to avoid leaving a value in an uninitialized state. I always 
try to initialize out-arguments in all code paths, usually with NULL, but here 
if no lchan is waiting it makes sense to remain in the current pchan_is.



--
To view, visit https://gerrit.osmocom.org/11981
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib8f9b7e1f584dee885d6823dc043682577572bd8
Gerrit-Change-Number: 11981
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-CC: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:02:57 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-bsc[master]: Fix ts_for_each_lchan iteration for dynamic TS in process of being PD...

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11957 )

Change subject: Fix ts_for_each_lchan iteration for dynamic TS in process of 
being PDCH deactivated
..


Patch Set 3: Code-Review+2

(3 comments)

https://gerrit.osmocom.org/#/c/11957/3//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/11957/3//COMMIT_MSG@7
PS3, Line 7: Fix ts_for_each_lchan iteration for dynamic TS in process of being 
PDCH deactivated
(ideas to make it shorter... 'fix lchan iteration for dyn TS during PDCH Deact')


https://gerrit.osmocom.org/#/c/11957/3//COMMIT_MSG@9
PS3, Line 9: In general PDCH channels are not handled as lchans in BTS 
(lchan_fsm.c),
"BTS (lchan_fsm.c)"???


https://gerrit.osmocom.org/#/c/11957/3//COMMIT_MSG@11
PS3, Line 11: being used.
I believe this commit log message has 'I wrote a long letter because I didn't 
have the time to make it shorter' syndrome.

"To make sure that a dyn TS error signals an error to all waiting lchans, make 
sure to iterate all potential lchans even if pchan_is == GSM_PCHAN_PDCH and no 
lchans are really enabled yet.

For example, previously, a PDCH Deact NACK failed to signal waiting lchans, as 
ts_for_each_lchan() iterates only lchans that make sense with the current pchan 
mode."

That's all of it, right?



--
To view, visit https://gerrit.osmocom.org/11957
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9cedb77d6578597f1febab36c54b2ee427c7a4a2
Gerrit-Change-Number: 11957
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 19:00:23 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: Add define for ts_as_pchan_for_each_lchan with ts->pchan_on_init

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11980 )

Change subject: bsc: Add define for ts_as_pchan_for_each_lchan with 
ts->pchan_on_init
..


Patch Set 2: Code-Review+1

(5 comments)

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

https://gerrit.osmocom.org/#/c/11980/2//COMMIT_MSG@10
PS2, Line 10: to document its (intrincate) logic around it and its possible 
uses.
intricate


https://gerrit.osmocom.org/#/c/11980/2/include/osmocom/bsc/gsm_data.h
File include/osmocom/bsc/gsm_data.h:

https://gerrit.osmocom.org/#/c/11980/2/include/osmocom/bsc/gsm_data.h@482
PS2, Line 482:  * on PCHAN \ref ts (dynamic) configuration.
(is that doxygen notation in a non-doxygen comment in a project that doesn't 
generate doxygen api docs?)

Can you rephrase "based on PCHAN ts (dynamic) config"?


https://gerrit.osmocom.org/#/c/11980/2/include/osmocom/bsc/gsm_data.h@488
PS2, Line 488:  * of \ref lchan.
Maybe rather...

"Iterate all lchan instances set up by this timeslot type, including those 
lchans currently disabled (e.g. due to dynamic timeslot in switchover). Compare 
ts_for_each_lchan(), which iterates only the enabled lchans."


https://gerrit.osmocom.org/#/c/11980/2/include/osmocom/bsc/gsm_data.h@490
PS2, Line 490:  * configuration PDCH (no lchans) to TCH_F (1 lchan), where 
pchan_is is still
To name all possibilities, you'd have to name both dyn TS kinds, all TCH 
targets, as well as TCH/F_TCH/H_PDCH in unused mode when GPRS is disabled, or 
ones switching between TCH/F and TCH/H, ...

So maybe rather start with "For example,..."


https://gerrit.osmocom.org/#/c/11980/2/include/osmocom/bsc/gsm_data.h@494
PS2, Line 494: #define ts_for_each_lchan_slot(lchan, ts) 
ts_as_pchan_for_each_lchan(lchan, ts, (ts)->pchan_on_init)
IMHO "slot" is a general term not describing what sets this macro apart from 
ts_for_each_lchan(). Can't think of a better name either... 
ts_for_each_potential_lchan()??



--
To view, visit https://gerrit.osmocom.org/11980
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia1d4bdbfca6b9719f54ee609b6bfadf7f3a4bb43
Gerrit-Change-Number: 11980
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 18:48:02 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: timeslot_fsm: Switch to error state before dispatching error eve...

2018-11-29 Thread Neels Hofmeyr
Neels Hofmeyr has posted comments on this change. ( 
https://gerrit.osmocom.org/11995 )

Change subject: bsc: timeslot_fsm: Switch to error state before dispatching 
error event to lchans
..


Patch Set 2: Code-Review-1

(2 comments)

please bear with my scepticism, as the way the FSMs interact can become quite 
complex and I want to understand the implications before I approve.

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

https://gerrit.osmocom.org/#/c/11995/2//COMMIT_MSG@10
PS2, Line 10: to handle them, as a result from dispatching LCHAN_EV_TS_ERROR 
previously.
I don't understand: which state is unable to handle TS_EV_LCHAN_UNUSED? If it 
should be able to, then let's make it handle that event properly?


https://gerrit.osmocom.org/#/c/11995/2/src/osmo-bsc/timeslot_fsm.c
File src/osmo-bsc/timeslot_fsm.c:

https://gerrit.osmocom.org/#/c/11995/2/src/osmo-bsc/timeslot_fsm.c@177
PS2, Line 177:  ts_lchans_dispatch(ts, LCHAN_ST_WAIT_TS_READY, 
LCHAN_EV_TS_ERROR);
Sorry, I'm not convinced:

- my premise is that the lchan should be able to handle a TS_ERROR 
independently from the timeslot's state.

- when a timeslot changes its state, it might trigger immediate other actions, 
maybe also affecting lchans. I'm imagining an lchan being put up for more 
activity before it was even told that there was some problem before...

I'm sure you've seen an example that shows that this makes sense; instead I'm 
arguing from the angle of the ideas and premises I had in mind when writing the 
way the FSMs interact, trying to cover all (un)thinkable situations.



--
To view, visit https://gerrit.osmocom.org/11995
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If61493e7d5449bf2c2de9fd34cdf2410625e92ac
Gerrit-Change-Number: 11995
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 18:27:58 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes


Change in osmo-bts[master]: bts-trx: (n)ack PDCH DEACT only after TRX answered SETSLOT

2018-11-29 Thread Pau Espin Pedrol
Hello Vadim Yanitskiy, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/11932

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

Change subject: bts-trx: (n)ack PDCH DEACT only after TRX answered SETSLOT
..

bts-trx: (n)ack PDCH DEACT only after TRX answered SETSLOT

Before this patch, PDCH DEACT was (n)acked to the BSC without taking
into account if TRX succeeded or failed to set the TS:

20181123044720655 DRLL <0002> rsl.c:2523 (bts=0,trx=0,ts=0,ss=0) Rx RLL 
DATA_REQ Abis -> LAPDm
20181123044720700 DRSL <> rsl.c:2805 (bts=0,trx=0,ts=6,pchan=TCH/F_PDCH as 
PDCH) ss=0 Rx RSL IPAC_PDCH_DEACT
20181123044720700 DRSL <> rsl.c:2205 (bts=0,trx=0,ts=6,pchan=TCH/F_PDCH as 
PDCH) Request to PDCH DEACT, but lchan is still active
20181123044720700 DRSL <> rsl.c:2131 (bts=0,trx=0,ts=6,ss=0) Tx PDCH DEACT 
NACK (cause = 0x0f)
20181123044720700 DPCU <0009> pcu_sock.c:124 Sending info
20181123044720700 DPCU <0009> pcu_sock.c:139 BTS is up
20181123044720700 DPCU <0009> pcu_sock.c:232 trx=0 ts=7: available (tsc=7 
arfcn=868)
20181123044720703 DPCU <0009> pcu_sock.c:608 Deactivate request received: TRX=0 
TX=6
20181123044720703 DL1C <0006> l1sap.c:1519 deactivating channel chan_nr=TCH/F 
on TS6 trx=0
20181123044720703 DTRX <000b> trx_if.c:242 Enqueuing TRX control command 'CMD 
NOHANDOVER 6 0'
20181123044720703 DL1C <0006> l1sap.c:648 deactivate confirm chan_nr=TCH/F on 
TS6 trx=0
20181123044720703 DRSL <> rsl.c:714 (bts=0,trx=0,ts=6,ss=0) not sending REL 
ACK
20181123044720703 DRSL <> rsl.c:2264 (bts=0,trx=0,ts=6,ss=0) PDCH DEACT 
operation: channel disconnected, will reconnect as TCH
20181123044720703 DL1C <0006> scheduler.c:593 Configuring multiframe with 
TCH/F+SACCH trx=0 ts=6
20181123044720703 DTRX <000b> trx_if.c:242 Enqueuing TRX control command 'CMD 
SETSLOT 6 1'
20181123044720703 DL1C <0006> l1_if.c:780 (bts=0,trx=0,ts=6) 
bts_model_ts_connect(as_pchan=TCH/F) success, calling cb_ts_connected()
20181123044720703 DRSL <> rsl.c:2339 (bts=0,trx=0,ts=6,ss=0) PDCH DEACT 
operation: timeslot connected as TCH/F
20181123044720703 DRSL <> rsl.c:2440 (bts=0,trx=0,ts=6,ss=0) TCH/F_PDCH 
switched to TCH/F mode (ts->flags == 0)
20181123044720703 DRSL <> rsl.c:2103 (bts=0,trx=0,ts=6,ss=0) Tx PDCH DEACT 
ACK
20181123044720704 DTRX <000b> trx_if.c:492 Response message: 'RSP NOHANDOVER 0 
6'
20181123044720705 DTRX <000b> trx_if.c:492 Response message: 'RSP SETSLOT 0 6 1'

Change-Id: I888de761b65c3ea8bfe623fcf009f3b2b57c926c
---
M src/osmo-bts-trx/l1_if.c
M src/osmo-bts-trx/trx_if.c
M src/osmo-bts-trx/trx_if.h
3 files changed, 81 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/32/11932/4
--
To view, visit https://gerrit.osmocom.org/11932
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I888de761b65c3ea8bfe623fcf009f3b2b57c926c
Gerrit-Change-Number: 11932
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmo-bts[master]: bts-trx: (n)ack PDCH DEACT only after TRX answered SETSLOT

2018-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11932 )

Change subject: bts-trx: (n)ack PDCH DEACT only after TRX answered SETSLOT
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/#/c/11932/3/src/osmo-bts-trx/l1_if.c
File src/osmo-bts-trx/l1_if.c:

https://gerrit.osmocom.org/#/c/11932/3/src/osmo-bts-trx/l1_if.c@163
PS3, Line 163: PRIu8
> AFAIK, we usually use '%u' for uint8_t. Not critical though.
I think it's more clear to use PRIu8 when using uint8_t.



--
To view, visit https://gerrit.osmocom.org/11932
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I888de761b65c3ea8bfe623fcf009f3b2b57c926c
Gerrit-Change-Number: 11932
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 29 Nov 2018 18:03:03 +
Gerrit-HasComments: Yes
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: MSC_Tests.ttcn: introduce TC_lu_and_ss_session_timeout

2018-11-29 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11985 )

Change subject: MSC_Tests.ttcn: introduce TC_lu_and_ss_session_timeout
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11985
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3e1791773d56617172ae27a46889a1ae4d400e2f
Gerrit-Change-Number: 11985
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 29 Nov 2018 17:21:39 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: library/GSUP_Types.ttcn: fix IE order in PROC_SS_ERROR templates

2018-11-29 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11990 )

Change subject: library/GSUP_Types.ttcn: fix IE order in PROC_SS_ERROR templates
..


Patch Set 3:

We basically follow pretty much what most 3GPP/GSM specs do: Have a TLV like 
structure, but still the specs mandate a fixed order of IEs.  All of the 
osmocom receivers can receive the IEs in any order, though.

If one wanted to make the receive templates accept arbitrary order, one could 
use a different construct such as "set of" rather than "record of".  But I 
think it's best to proceed like here, i.e. expect and accept one given order of 
IEs only.


--
To view, visit https://gerrit.osmocom.org/11990
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5eb2314f6a9ab0e9fc5e836390414cec6e1a12db
Gerrit-Change-Number: 11990
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 17:19:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-ttcn3-hacks[master]: library/GSUP_Types.ttcn: fix IE order in PROC_SS_ERROR templates

2018-11-29 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11990 )

Change subject: library/GSUP_Types.ttcn: fix IE order in PROC_SS_ERROR templates
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11990
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5eb2314f6a9ab0e9fc5e836390414cec6e1a12db
Gerrit-Change-Number: 11990
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Comment-Date: Thu, 29 Nov 2018 17:18:22 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ttcn3-hacks[master]: library/GSUP_Types.ttcn: fix missing session state IE in PROC_SS_ERR

2018-11-29 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11984 )

Change subject: library/GSUP_Types.ttcn: fix missing session state IE in 
PROC_SS_ERR
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11984
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I44070396ce7119eab4608d9f9fb090bb223dfaa2
Gerrit-Change-Number: 11984
Gerrit-PatchSet: 3
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 29 Nov 2018 17:17:51 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: bsc: lchan_rtp_fsm: Avoid duplicate LCHAN_EV_RTP_RELEASED event

2018-11-29 Thread Pau Espin Pedrol
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/11993

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

Change subject: bsc: lchan_rtp_fsm: Avoid duplicate LCHAN_EV_RTP_RELEASED event
..

bsc: lchan_rtp_fsm: Avoid duplicate LCHAN_EV_RTP_RELEASED event

When lchan_rtp_fsm instance is allcoated with
osmo_fsm_inst_alloc_child(..., LCHAN_EV_RTP_RELEASED) we already let fsm
code to take care of sending that event ito the parent when the fsm is
terminated (but only if freeing cause is not OSMO_FSM_TERM_PARENT).
The lchan_rtp_fsm cleanup() callback, which is called immediatelly before
sending to the parent the event defined during osmo_gsm_install_alloc_child(),
currently also sends that same event, which ends up in a duplicated
event being sent as shown in log files below.
Let's only send the event in cleanup() if we are in the
cause=OSMO_FSM_TERM_PARENT scenario, to make sure parent always receives the
event, but only once.

20181128193707326 DAS <0012> osmo-bsc/assignment_fsm.c:127 
assignment(conn4_0-0-6-TCH_F_PDCHasPDCH-0)[0x612024a0]{WAIT_LCHAN_ACTIVE}: 
(bts=0,trx=0,ts=6,ss=0) Assignment failed
20181128193707326 DAS <0012> osmo-bsc/assignment_fsm.c:128 
assignment(conn4_0-0-6-TCH_F_PDCHasPDCH-0)[0x612024a0]{WAIT_LCHAN_ACTIVE}: 
Terminating (cause = OSMO_FSM_TERM_ERROR)
20181128193707326 DAS <0012> osmo-bsc/assignment_fsm.c:128 
assignment(conn4_0-0-6-TCH_F_PDCHasPDCH-0)[0x612024a0]{WAIT_LCHAN_ACTIVE}: 
Removing from parent SUBSCR_CONN(conn4)[0x61202920]
20181128193707326 DCHAN <0010> osmo-bsc/lchan_fsm.c:1333 
lchan_rtp(0-0-6-TCH_F_PDCH-0)[0x61202320]{WAIT_MGW_ENDPOINT_AVAILABLE}: 
Received Event LCHAN_RTP_EV_ROLLBACK
20181128193707326 DCHAN <0010> osmo-bsc/lchan_rtp_fsm.c:193 
lchan_rtp(0-0-6-TCH_F_PDCH-0)[0x61202320]{WAIT_MGW_ENDPOINT_AVAILABLE}: 
Terminating (cause = OSMO_FSM_TERM_REQUEST)
20181128193707326 DCHAN <0010> osmo-bsc/lchan_rtp_fsm.c:193 
lchan_rtp(0-0-6-TCH_F_PDCH-0)[0x61202320]{WAIT_MGW_ENDPOINT_AVAILABLE}: 
Removing from parent lchan(0-0-6-TCH_F_PDCH-0)[0x612039a0]
20181128193707326 DRSL <0003> osmo-bsc/mgw_endpoint_fsm.c:441 
mgw-endpoint(conn4)[0x612021a0]{WAIT_MGW_RESPONSE}: (rtpbridge/*@mgw) CI[0] 
to-BTS: DLCX :0: notify=NULL
20181128193707326 DRSL <0003> osmo-bsc/mgw_endpoint_fsm.c:482 
mgw-endpoint(conn4)[0x612021a0]{WAIT_MGW_RESPONSE}: (rtpbridge/*@mgw) CI[0] 
to-BTS: DLCX :0: Scheduling
20181128193707326 DCHAN <0010> osmo-bsc/lchan_rtp_fsm.c:742 
lchan(0-0-6-TCH_F_PDCH-0)[0x612039a0]{WAIT_TS_READY}: Received Event 
LCHAN_EV_RTP_RELEASED
20181128193707326 DCHAN <0010> osmo-bsc/lchan_rtp_fsm.c:193 
lchan_rtp(0-0-6-TCH_F_PDCH-0)[0x61202320]{WAIT_MGW_ENDPOINT_AVAILABLE}: 
Freeing instance
20181128193707327 DCHAN <0010> fsm.c:381 
lchan_rtp(0-0-6-TCH_F_PDCH-0)[0x61202320]{WAIT_MGW_ENDPOINT_AVAILABLE}: 
Deallocated
20181128193707327 DCHAN <0010> osmo-bsc/lchan_rtp_fsm.c:193 
lchan(0-0-6-TCH_F_PDCH-0)[0x612039a0]{WAIT_TS_READY}: Received Event 
LCHAN_EV_RTP_RELEASED
20181128193707330 DCHAN <0010> osmo-bsc/lchan_fsm.c:1347 
lchan(0-0-6-TCH_F_PDCH-0)[0x612039a0]{WAIT_TS_READY}: transition to state 
WAIT_RLL_RTP_RELEASED not permitted!
20181128193707330 DAS <0012> osmo-bsc/assignment_fsm.c:128 
assignment(conn4_0-0-6-TCH_F_PDCHasPDCH-0)[0x612024a0]{WAIT_LCHAN_ACTIVE}: 
Freeing instance
20181128193707330 DAS <0012> fsm.c:381 
assignment(conn4_0-0-6-TCH_F_PDCHasPDCH-0)[0x612024a0]{WAIT_LCHAN_ACTIVE}: 
Deallocated

Change-Id: I3e95a21e5a5ec6c35b1ab20b7a642fd7eb81e556
---
M src/osmo-bsc/lchan_rtp_fsm.c
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/93/11993/2
--
To view, visit https://gerrit.osmocom.org/11993
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3e95a21e5a5ec6c35b1ab20b7a642fd7eb81e556
Gerrit-Change-Number: 11993
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: bsc: trx_count_free_ts: Fix counting of GSM_PCHAN_PDCH

2018-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has abandoned this change. ( https://gerrit.osmocom.org/11956 )

Change subject: bsc: trx_count_free_ts: Fix counting of GSM_PCHAN_PDCH
..


Abandoned
--
To view, visit https://gerrit.osmocom.org/11956
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I7a785b70fd0a34a52504e9a46b4b27889463f67e
Gerrit-Change-Number: 11956
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 


Change in osmo-bsc[master]: bsc: timeslot_fsm: Fix ts_is_lchan_waiting_for_pchan

2018-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11954 )

Change subject: bsc: timeslot_fsm: Fix ts_is_lchan_waiting_for_pchan
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/11954
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib03e5a91438a5b74a04e69f81fab565842b02b66
Gerrit-Change-Number: 11954
Gerrit-PatchSet: 4
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-CC: Harald Welte 
Gerrit-CC: Vadim Yanitskiy 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:51:48 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: Fix ts_for_each_lchan iteration for dynamic TS in process of being PD...

2018-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11957 )

Change subject: Fix ts_for_each_lchan iteration for dynamic TS in process of 
being PDCH deactivated
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/11957
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I9cedb77d6578597f1febab36c54b2ee427c7a4a2
Gerrit-Change-Number: 11957
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Assignee: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:51:29 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in openbsc[master]: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git

2018-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12010 )

Change subject: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git
..


Patch Set 1:

> > may be unrelated if it's already called this way in the original
 > code.  However, it's osmo-bsc-nat or OsmoBSCNAT, not just OsmoNAT.
 > Might be worth following up in a separate change after the move? Or
 > do it before the move? Either way, I'm noticing naming
 > inconsistency here.
 >
 > Yes, I can do this in a follow-up patch. Does the same count for
 > OsmoMGCP -> OsmoBSCMGCP?

Yes, otherwise it sounds like MGCP generic to me, and the binary in openbs.git 
is really attached to osmo-bsc-sccplite (and osmo-bsc-nat).


--
To view, visit https://gerrit.osmocom.org/12010
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibace91bc518079765e12529596a1763b6c5a04b5
Gerrit-Change-Number: 12010
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:26:44 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-trx[master]: lms: User correct scale factor for transmit samples

2018-11-29 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12006 )

Change subject: lms: User correct scale factor for transmit samples
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12006
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I71702feaa11f53e7614a6938a984dd748405474a
Gerrit-Change-Number: 12006
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:24:28 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-trx[master]: lms: Use a default Tx gain value of 64 dB.

2018-11-29 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12008 )

Change subject: lms: Use a default Tx gain value of 64 dB.
..


Patch Set 2:

> Oh I got the description wrong. So actuallt the default is
 > "tx-attenuation oml" when no option is set, which means attenuation
 > is set by BSC: "Use NM_ATT_RF_MAXPOWR_R (max power reduction) from
 > BSC via OML".

I've always thought of this as rather ugly.  There is a mixture of different 
concepts here.

The base gain setting (64..66 dB) is a property of the SDR hardware, as 
recommended by the hardware manufacturer in order to reach the maximum possible 
output level without going into saturation.  This "maximum clean transmit 
output power" is called "nominal transmit power".

The NM_ATT_RF_MAXPOWR_R is a 3GPP specified value which is operator 
configuration as to how manyy steps of 2dB the BTS should transmit *below* that 
nominal value.

So the correct processing is to always use both, and subtract them.

Default: Use 64..66 dBm value as base line, and substact the NM_ATT_RF_MAXPWR_R
User override: specify a lower/higher base gain value instead of 64..66.


--
To view, visit https://gerrit.osmocom.org/12008
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Id018b27b1d8a2f48d60b29e688583c9a5ac49a81
Gerrit-Change-Number: 12008
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:24:04 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in openbsc[master]: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git

2018-11-29 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12010 )

Change subject: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git
..


Patch Set 1:

> may be unrelated if it's already called this way in the original code.  
> However, it's osmo-bsc-nat or OsmoBSCNAT, not just OsmoNAT.  Might be worth 
> following up in a separate change after the move? Or do it before the move? 
> Either way, I'm noticing naming inconsistency here.

Yes, I can do this in a follow-up patch. Does the same count for OsmoMGCP -> 
OsmoBSCMGCP?


--
To view, visit https://gerrit.osmocom.org/12010
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibace91bc518079765e12529596a1763b6c5a04b5
Gerrit-Change-Number: 12010
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:23:45 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-gsm-tester[master]: nanobts: Use -G parameter of ipaccess-config to avoid need to restart...

2018-11-29 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11750 )

Change subject: nanobts: Use -G parameter of ipaccess-config to avoid need to 
restart nanoBTS
..


Patch Set 5: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/11750
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2871dee3de11512250445127f0b807a8990fd4c6
Gerrit-Change-Number: 11750
Gerrit-PatchSet: 5
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:20:03 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git

2018-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12010 )

Change subject: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git
..


Patch Set 1:

Good point. I think it can be done in a follow-up patch.


--
To view, visit https://gerrit.osmocom.org/12010
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibace91bc518079765e12529596a1763b6c5a04b5
Gerrit-Change-Number: 12010
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:19:49 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in openbsc[master]: manuals/OsmoNITB: integrate into this repository

2018-11-29 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11999 )

Change subject: manuals/OsmoNITB: integrate into this repository
..

manuals/OsmoNITB: integrate into this repository

Move from doc/manuals to manuals/OsmoNITB as we have two more manuals
(OsmoMGCP and OsmoNAT) that need to be moved to manuals/. Make the
manuals build without a toplevel configure.ac file from autotools:

$ cd manuals/OsmoNITB
$ make

openbsc/configure.ac is not used to integrate the manuals, as it would
be extra effort to integrate all three of the manuals there. This is
not worth it for the legacy codebase.

Related: OS#3385
Change-Id: I0036ad8dbecd23695305ac491c7ee87caa44c7f9
---
A manuals/.gitignore
R manuals/OsmoNITB/Makefile
R manuals/OsmoNITB/chapters/bts-examples.adoc
R manuals/OsmoNITB/chapters/control.adoc
R manuals/OsmoNITB/chapters/hlr.adoc
R manuals/OsmoNITB/chapters/net.adoc
R manuals/OsmoNITB/chapters/overview.adoc
R manuals/OsmoNITB/chapters/running.adoc
R manuals/OsmoNITB/osmonitb-usermanual-docinfo.xml
R manuals/OsmoNITB/osmonitb-usermanual.adoc
R manuals/OsmoNITB/osmonitb-vty-reference.xml
R manuals/OsmoNITB/vty/bsc_vty_additions.xml
R manuals/OsmoNITB/vty/nitb_vty_additions.xml
R manuals/OsmoNITB/vty/nitb_vty_reference.xml
A manuals/osmo-gsm-manuals-dir.sh
15 files changed, 36 insertions(+), 6 deletions(-)

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



diff --git a/manuals/.gitignore b/manuals/.gitignore
new file mode 100644
index 000..565590f
--- /dev/null
+++ b/manuals/.gitignore
@@ -0,0 +1,8 @@
+*.html
+*.svg
+*.pdf
+*__*.png
+*.check
+generated
+common
+build
diff --git a/doc/manuals/Makefile.am b/manuals/OsmoNITB/Makefile
similarity index 65%
rename from doc/manuals/Makefile.am
rename to manuals/OsmoNITB/Makefile
index 3735c5b..9f28305 100644
--- a/doc/manuals/Makefile.am
+++ b/manuals/OsmoNITB/Makefile
@@ -1,9 +1,5 @@
-OSMO_GSM_MANUALS_DIR = $(top_srcdir)
-EXTRA_DIST = osmonitb-usermanual.adoc \
-   osmonitb-usermanual-docinfo.xml \
-   osmonitb-vty-reference.xml \
-   chapters \
-   vty
+OSMO_GSM_MANUALS_DIR := $(shell ../osmo-gsm-manuals-dir.sh)
+srcdir=$(CURDIR)

 ASCIIDOC = osmonitb-usermanual.adoc
 ASCIIDOC_DEPS = $(srcdir)/chapters/*.adoc
diff --git a/doc/manuals/chapters/bts-examples.adoc 
b/manuals/OsmoNITB/chapters/bts-examples.adoc
similarity index 100%
rename from doc/manuals/chapters/bts-examples.adoc
rename to manuals/OsmoNITB/chapters/bts-examples.adoc
diff --git a/doc/manuals/chapters/control.adoc 
b/manuals/OsmoNITB/chapters/control.adoc
similarity index 100%
rename from doc/manuals/chapters/control.adoc
rename to manuals/OsmoNITB/chapters/control.adoc
diff --git a/doc/manuals/chapters/hlr.adoc b/manuals/OsmoNITB/chapters/hlr.adoc
similarity index 100%
rename from doc/manuals/chapters/hlr.adoc
rename to manuals/OsmoNITB/chapters/hlr.adoc
diff --git a/doc/manuals/chapters/net.adoc b/manuals/OsmoNITB/chapters/net.adoc
similarity index 100%
rename from doc/manuals/chapters/net.adoc
rename to manuals/OsmoNITB/chapters/net.adoc
diff --git a/doc/manuals/chapters/overview.adoc 
b/manuals/OsmoNITB/chapters/overview.adoc
similarity index 100%
rename from doc/manuals/chapters/overview.adoc
rename to manuals/OsmoNITB/chapters/overview.adoc
diff --git a/doc/manuals/chapters/running.adoc 
b/manuals/OsmoNITB/chapters/running.adoc
similarity index 100%
rename from doc/manuals/chapters/running.adoc
rename to manuals/OsmoNITB/chapters/running.adoc
diff --git a/doc/manuals/osmonitb-usermanual-docinfo.xml 
b/manuals/OsmoNITB/osmonitb-usermanual-docinfo.xml
similarity index 100%
rename from doc/manuals/osmonitb-usermanual-docinfo.xml
rename to manuals/OsmoNITB/osmonitb-usermanual-docinfo.xml
diff --git a/doc/manuals/osmonitb-usermanual.adoc 
b/manuals/OsmoNITB/osmonitb-usermanual.adoc
similarity index 100%
rename from doc/manuals/osmonitb-usermanual.adoc
rename to manuals/OsmoNITB/osmonitb-usermanual.adoc
diff --git a/doc/manuals/osmonitb-vty-reference.xml 
b/manuals/OsmoNITB/osmonitb-vty-reference.xml
similarity index 100%
rename from doc/manuals/osmonitb-vty-reference.xml
rename to manuals/OsmoNITB/osmonitb-vty-reference.xml
diff --git a/doc/manuals/vty/bsc_vty_additions.xml 
b/manuals/OsmoNITB/vty/bsc_vty_additions.xml
similarity index 100%
rename from doc/manuals/vty/bsc_vty_additions.xml
rename to manuals/OsmoNITB/vty/bsc_vty_additions.xml
diff --git a/doc/manuals/vty/nitb_vty_additions.xml 
b/manuals/OsmoNITB/vty/nitb_vty_additions.xml
similarity index 100%
rename from doc/manuals/vty/nitb_vty_additions.xml
rename to manuals/OsmoNITB/vty/nitb_vty_additions.xml
diff --git a/doc/manuals/vty/nitb_vty_reference.xml 
b/manuals/OsmoNITB/vty/nitb_vty_reference.xml
similarity index 100%
rename from doc/manuals/vty/nitb_vty_reference.xml
rename to manuals/OsmoNITB/vty/nitb_vty_reference.xml
diff --git a/manuals/osmo-gsm-manuals-dir.sh 

Change in osmo-gsm-manuals[master]: remove leftovers from manuals move

2018-11-29 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12003 )

Change subject: remove leftovers from manuals move
..

remove leftovers from manuals move

Remove leftover OsmoMSC/Makefile.am, which should have been deleted
already in Ib234fe4f4ac36c27a4ad8a8d0050c1d6874232bc ("remove OsmoMSC
files (now avail in osmo-msc.git)").

Remove the upload taget in Makefile.am, as there are not project
specific files anymore.

Related: OS#3385
Change-Id: I8716c41b03b09250e61e6a29fe9589454258fe03
---
M Makefile.am
D OsmoMSC/Makefile.am
2 files changed, 0 insertions(+), 21 deletions(-)

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



diff --git a/Makefile.am b/Makefile.am
index 5386b5f..2a7b881 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,8 +28,3 @@

 uninstall-local:
rm -rv "$(share_path)" 
"$(DESTDIR)$(prefix)/bin/osmo-gsm-manuals-check-depends"
-
-upload:
-   for i in Osmo*; do \
-   $(MAKE) -C "$$i" upload || exit 1; \
-   done
diff --git a/OsmoMSC/Makefile.am b/OsmoMSC/Makefile.am
deleted file mode 100644
index 0fcd1ff..000
--- a/OsmoMSC/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-OSMO_GSM_MANUALS_DIR = $(top_srcdir)
-EXTRA_DIST = osmomsc-usermanual.adoc \
-   osmomsc-usermanual-docinfo.xml \
-   osmomsc-vty-reference.xml \
-   chapters \
-   images \
-   vty
-
-ASCIIDOC = osmomsc-usermanual.adoc
-ASCIIDOC_DEPS = $(srcdir)/chapters/*.adoc
-include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.asciidoc.inc
-
-VTY_REFERENCE = osmomsc-vty-reference.xml
-include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
-
-include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc

--
To view, visit https://gerrit.osmocom.org/12003
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8716c41b03b09250e61e6a29fe9589454258fe03
Gerrit-Change-Number: 12003
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: osmith 


Change in osmo-ci[master]: master-builds: use jenkins.sh --publish

2018-11-29 Thread osmith
osmith has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12012 )

Change subject: master-builds: use jenkins.sh --publish
..

master-builds: use jenkins.sh --publish

Add --publish to the contrib/jenkins.sh calls for each Osmocom project,
where PDF manuals should be published. As this parameter is only passed
to jenkins.sh from the master-builds job, not from the
gerrit-verification job, we can add logic to upload the generated PDFs
when getting triggered because of changes in master.

Related: OS#3385
Change-Id: I3cc01dbc57213b6d6cdc9b394a516510d045f1ae
---
M jobs/master-builds.yml
1 file changed, 13 insertions(+), 8 deletions(-)

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



diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml
index 6b07694..67a9b80 100644
--- a/jobs/master-builds.yml
+++ b/jobs/master-builds.yml
@@ -16,7 +16,7 @@
 a3: !!python/tuple [default]
 combination_filter: ''
 sequential: false
-# most common build invocation
+# most common build invocation (--publish is added to publish manual PDFs)
 cmd: ./contrib/jenkins.sh
 wrappers: []
 trigger:
@@ -82,6 +82,7 @@
 master-osmo-iuh,
 master-osmo-msc,
 master-osmo-sgsn
+  cmd: ./contrib/jenkins.sh --publish

   - libosmocore:
   a1_name: arch
@@ -174,7 +175,7 @@
   -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
   -w /build -i -u build \
   -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
-  osmocom:amd64 /build/contrib/jenkins.sh
+  osmocom:amd64 /build/contrib/jenkins.sh --publish

   - osmo-bts:
   a1_name: FIRMWARE_VERSION
@@ -190,12 +191,12 @@
 (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo") ||
 (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15") ||
 (FIRMWARE_VERSION == "origin/nrw/litecell15" && BTS_MODEL == 
"lc15")
-  cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"'
+  cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL" --publish'

   - osmo-ggsn:
   a1_name: GTP
   a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux]
-  cmd: GTP="$GTP" ./contrib/jenkins.sh
+  cmd: GTP="$GTP" ./contrib/jenkins.sh --publish
   trigger: master-osmo-sgsn

   - osmo-gmr:
@@ -207,7 +208,8 @@
# keep first line with less indent to preserve newlines
 ./contrib/jenkins.sh

-  - osmo-hlr
+  - osmo-hlr:
+  cmd: ./contrib/jenkins.sh --publish

   - osmo-iuh:
   # Full triggers would be:
@@ -233,7 +235,7 @@
   -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
   -w /build -i -u build \
   -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
-  osmocom:amd64 /build/contrib/jenkins.sh
+  osmocom:amd64 /build/contrib/jenkins.sh --publish
   trigger: master-osmo-msc, master-osmo-bsc

   - osmo-msc:
@@ -256,7 +258,7 @@
   -w /build -u build \
   -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
   -v "$ARTIFACT_STORE:/artifact_store" \
-  osmocom:amd64 /build/contrib/jenkins.sh
+  osmocom:amd64 /build/contrib/jenkins.sh --publish

   - osmo-pcap

@@ -279,6 +281,7 @@
 (with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="v2017.01") ||
 (with_vty == "True" && with_dsp == "lc15" && 
FIRMWARE_VERSION=="origin/nrw/litecell15") ||
 (with_vty == "False" && with_dsp == "none" && 
FIRMWARE_VERSION=="master")
+  cmd: ./contrib/jenkins.sh --publish

   - osmo-sgsn:
   a1_name: IU
@@ -295,10 +298,11 @@
   -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
   -w /build -i -u build \
   -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
-  osmocom:amd64 /build/contrib/jenkins.sh
+  osmocom:amd64 /build/contrib/jenkins.sh --publish

   - osmo-sip-connector:
   email: gerrit-log@lists.osmocom.org lafo...@gnumonks.org 
hol...@freyther.de
+  cmd: ./contrib/jenkins.sh --publish

   - osmo-tetra:
   email: gerrit-log@lists.osmocom.org lafo...@gnumonks.org 
246...@gmail.com
@@ -309,6 +313,7 @@
   # a1: !!python/tuple [--with-sse, --with-neon, --with-neon-vfpv4]
   a1: !!python/tuple [--with-sse]
   concurrent: true
+  cmd: ./contrib/jenkins.sh --publish

   - osmocom-bb
   - osmo-sysmon

-- 
To view, visit https://gerrit.osmocom.org/12012
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I3cc01dbc57213b6d6cdc9b394a516510d045f1ae
Gerrit-Change-Number: 12012
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 

Change in openbsc[master]: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git

2018-11-29 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12010 )

Change subject: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git
..


Patch Set 1: Code-Review+1

may be unrelated if it's already called this way in the original code.  
However, it's osmo-bsc-nat or OsmoBSCNAT, not just OsmoNAT.  Might be worth 
following up in a separate change after the move? Or do it before the move? 
Either way, I'm noticing naming inconsistency here.


--
To view, visit https://gerrit.osmocom.org/12010
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibace91bc518079765e12529596a1763b6c5a04b5
Gerrit-Change-Number: 12010
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:18:54 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: master-builds: use jenkins.sh --publish

2018-11-29 Thread osmith
osmith has posted comments on this change. ( https://gerrit.osmocom.org/12012 )

Change subject: master-builds: use jenkins.sh --publish
..


Patch Set 1: Verified+1


--
To view, visit https://gerrit.osmocom.org/12012
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3cc01dbc57213b6d6cdc9b394a516510d045f1ae
Gerrit-Change-Number: 12012
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:18:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git

2018-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/12010 )

Change subject: OsmoMGCP and OsmoNAT manuals moved from osmo-gsm-manuals.git
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12010
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibace91bc518079765e12529596a1763b6c5a04b5
Gerrit-Change-Number: 12010
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:18:20 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in openbsc[master]: manuals/OsmoNITB: integrate into this repository

2018-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11999 )

Change subject: manuals/OsmoNITB: integrate into this repository
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11999
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0036ad8dbecd23695305ac491c7ee87caa44c7f9
Gerrit-Change-Number: 11999
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:17:27 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-ci[master]: master-builds: use jenkins.sh --publish

2018-11-29 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/12012 )

Change subject: master-builds: use jenkins.sh --publish
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/12012
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3cc01dbc57213b6d6cdc9b394a516510d045f1ae
Gerrit-Change-Number: 12012
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Harald Welte 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:16:24 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-gsm-tester[master]: nanobts: Use -G parameter of ipaccess-config to avoid need to restart...

2018-11-29 Thread Pau Espin Pedrol
Pau Espin Pedrol has posted comments on this change. ( 
https://gerrit.osmocom.org/11750 )

Change subject: nanobts: Use -G parameter of ipaccess-config to avoid need to 
restart nanoBTS
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/11750
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I2871dee3de11512250445127f0b807a8990fd4c6
Gerrit-Change-Number: 11750
Gerrit-PatchSet: 5
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Comment-Date: Thu, 29 Nov 2018 16:15:59 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: jenkins.sh: add --enable-werror to configure flags

2018-11-29 Thread Harald Welte
Harald Welte has abandoned this change. ( https://gerrit.osmocom.org/7109 )

Change subject: jenkins.sh: add --enable-werror to configure flags
..


Abandoned

Meanwhile implemented by Change-Id Ife9ca2a5b835dfd6d03c981dcf0e48265eb861eb
--
To view, visit https://gerrit.osmocom.org/7109
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: abandon
Gerrit-Change-Id: I2294151ab91522231095006a0599bea02e07c259
Gerrit-Change-Number: 7109
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmocom-bb[master]: trxcon/l1ctl.c: handle hopping channels from L1CTL_DM_EST_REQ

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10828 )

Change subject: trxcon/l1ctl.c: handle hopping channels from L1CTL_DM_EST_REQ
..

trxcon/l1ctl.c: handle hopping channels from L1CTL_DM_EST_REQ

Change-Id: I8617b5808748bc4df3d7cc9862ed8cf12613f270
---
M src/host/trxcon/l1ctl.c
1 file changed, 62 insertions(+), 21 deletions(-)

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



diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index f239b30..02aa3fa 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -554,43 +554,84 @@
return rc;
 }

+static int l1ctl_proc_est_req_h0(struct trx_instance *trx, struct l1ctl_h0 *h)
+{
+   uint16_t band_arfcn;
+   int rc = 0;
+
+   band_arfcn = ntohs(h->band_arfcn);
+
+   LOGP(DL1C, LOGL_NOTICE, "L1CTL_DM_EST_REQ indicates a single "
+   "ARFCN=%u channel\n", band_arfcn &~ ARFCN_FLAG_MASK);
+
+   /* Do we need to retune? */
+   if (trx->band_arfcn == band_arfcn)
+   return 0;
+
+   /* Tune transceiver to required ARFCN */
+   rc |= trx_if_cmd_rxtune(trx, band_arfcn);
+   rc |= trx_if_cmd_txtune(trx, band_arfcn);
+   if (rc)
+   return rc;
+
+   /* Update current ARFCN */
+   trx->band_arfcn = band_arfcn;
+
+   return 0;
+}
+
+static int l1ctl_proc_est_req_h1(struct trx_instance *trx, struct l1ctl_h1 *h)
+{
+   int rc;
+
+   LOGP(DL1C, LOGL_NOTICE, "L1CTL_DM_EST_REQ indicates a Frequency "
+   "Hopping (hsn=%u, maio=%u, chans=%u) channel\n",
+   h->hsn, h->maio, h->n);
+
+   /* No channels?!? */
+   if (!h->n) {
+   LOGP(DL1C, LOGL_ERROR, "No channels in mobile allocation?!?\n");
+   return -EINVAL;
+   }
+
+   /* Forward hopping parameters to TRX */
+   rc = trx_if_cmd_setfh(trx, h->hsn, h->maio, h->ma, h->n);
+   if (rc)
+   return rc;
+
+   /**
+* TODO: update the state of trx_instance somehow
+* in order to indicate that it is in hopping mode...
+*/
+   return 0;
+}
+
 static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg)
 {
enum gsm_phys_chan_config config;
struct l1ctl_dm_est_req *est_req;
struct l1ctl_info_ul *ul;
struct trx_ts *ts;
-   uint16_t band_arfcn;
uint8_t chan_nr, tn;
-   int rc = 0;
+   int rc;

ul = (struct l1ctl_info_ul *) msg->l1h;
est_req = (struct l1ctl_dm_est_req *) ul->payload;

-   band_arfcn = ntohs(est_req->h0.band_arfcn);
chan_nr = ul->chan_nr;
tn = chan_nr & 0x07;

-   LOGP(DL1C, LOGL_NOTICE, "Received L1CTL_DM_EST_REQ (arfcn=%u, "
-   "tn=%u, chan_nr=0x%02x, tsc=%u, tch_mode=0x%02x)\n",
-   (band_arfcn &~ ARFCN_FLAG_MASK), tn, chan_nr,
-   est_req->tsc, est_req->tch_mode);
+   LOGP(DL1C, LOGL_NOTICE, "Received L1CTL_DM_EST_REQ "
+   "(tn=%u, chan_nr=0x%02x, tsc=%u, tch_mode=0x%02x)\n",
+   tn, chan_nr, est_req->tsc, est_req->tch_mode);

-   if (est_req->h) {
-   LOGP(DL1C, LOGL_ERROR, "FHSS is not supported\n");
-   rc = -ENOTSUP;
+   /* Frequency hopping? */
+   if (est_req->h)
+   rc = l1ctl_proc_est_req_h1(l1l->trx, _req->h1);
+   else /* Single ARFCN */
+   rc = l1ctl_proc_est_req_h0(l1l->trx, _req->h0);
+   if (rc)
goto exit;
-   }
-
-   /* Only if the current ARFCN differs */
-   if (l1l->trx->band_arfcn != band_arfcn) {
-   /* Update current ARFCN */
-   l1l->trx->band_arfcn = band_arfcn;
-
-   /* Tune transceiver to required ARFCN */
-   trx_if_cmd_rxtune(l1l->trx, band_arfcn);
-   trx_if_cmd_txtune(l1l->trx, band_arfcn);
-   }

/* Update TSC (Training Sequence Code) */
l1l->trx->tsc = est_req->tsc;

--
To view, visit https://gerrit.osmocom.org/10828
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8617b5808748bc4df3d7cc9862ed8cf12613f270
Gerrit-Change-Number: 10828
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


Change in osmocom-bb[master]: trxcon/trx_if.c: add SETFH CTRL command support

2018-11-29 Thread Vadim Yanitskiy
Vadim Yanitskiy has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/10827 )

Change subject: trxcon/trx_if.c: add SETFH CTRL command support
..

trxcon/trx_if.c: add SETFH CTRL command support

The idea of SETFH command is to instruct transceiver to enable
frequency hopping mode using the following parameters:

  CMD SETFH [... ]

Note: since the length of a CTRL command is limited to 128
symbols (BTW: why?), the amount of channels is also limited.

Change-Id: Id3d44e6a2796f1ce8523a49dedd5d484052a5c7f
---
M src/host/trxcon/trx_if.c
M src/host/trxcon/trx_if.h
2 files changed, 46 insertions(+), 0 deletions(-)

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



diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index b8bbace..982fb40 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -391,6 +391,50 @@
return trx_ctrl_cmd(trx, 0, "SETTA", "%d", ta);
 }

+/*
+ * Frequency Hopping parameters indication
+ *
+ * SETFH instructs transceiver to enable frequency
+ * hopping mode using the given parameters.
+ * CMD SETFH [... ]
+ */
+
+int trx_if_cmd_setfh(struct trx_instance *trx, uint8_t hsn,
+   uint8_t maio, uint16_t *ma, size_t ma_len)
+{
+   char ma_buf[100];
+   char *ptr;
+   int i, rc;
+
+   /* No channels, WTF?!? */
+   if (!ma_len)
+   return -EINVAL;
+
+   /**
+* Compose a sequence of channels (mobile allocation)
+* FIXME: the length of a CTRL command is limited to 128 symbols,
+* so we may have some problems if there are many channels...
+*/
+   for (i = 0, ptr = ma_buf; i < ma_len; i++) {
+   /* Append a channel */
+   rc = snprintf(ptr, ma_buf + sizeof(ma_buf) - ptr, "%u ", ma[i]);
+   if (rc < 0)
+   return rc;
+
+   /* Move pointer */
+   ptr += rc;
+
+   /* Prevent buffer overflow */
+   if (ptr >= (ma_buf + 100))
+   return -EIO;
+   }
+
+   /* Overwrite the last space */
+   *(ptr - 1) = '\0';
+
+   return trx_ctrl_cmd(trx, 1, "SETFH", "%u %u %s", hsn, maio, ma_buf);
+}
+
 /* Get response from CTRL socket */
 static int trx_ctrl_read_cb(struct osmo_fd *ofd, unsigned int what)
 {
diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h
index be0d41a..d551252 100644
--- a/src/host/trxcon/trx_if.h
+++ b/src/host/trxcon/trx_if.h
@@ -67,6 +67,8 @@
 int trx_if_cmd_txtune(struct trx_instance *trx, uint16_t band_arfcn);

 int trx_if_cmd_setslot(struct trx_instance *trx, uint8_t tn, uint8_t type);
+int trx_if_cmd_setfh(struct trx_instance *trx, uint8_t hsn,
+   uint8_t maio, uint16_t *ma, size_t ma_len);

 int trx_if_cmd_measure(struct trx_instance *trx,
uint16_t band_arfcn_start, uint16_t band_arfcn_stop);

--
To view, visit https://gerrit.osmocom.org/10827
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Id3d44e6a2796f1ce8523a49dedd5d484052a5c7f
Gerrit-Change-Number: 10827
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Vadim Yanitskiy 


  1   2   >