[PATCH] python/osmo-python-tests[master]: scripts: add symlink to osmopy

2017-12-19 Thread Neels Hofmeyr

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

scripts: add symlink to osmopy

To allow running the scripts from within the scripts/ dir without having to
install osmopy on the system first, place a symlink to the osmopy module dir.
This allows testing modifications without having to run setup.py all the time.

Change-Id: I880c8afa8d02ef112a80cb54f649ec71902bbd4c
---
A scripts/osmopy
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/93/5493/1

diff --git a/scripts/osmopy b/scripts/osmopy
new file mode 12
index 000..2ba06a1
--- /dev/null
+++ b/scripts/osmopy
@@ -0,0 +1 @@
+../osmopy/
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I880c8afa8d02ef112a80cb54f649ec71902bbd4c
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] python/osmo-python-tests[master]: README: mention osmo_interact_* and osmo_verify_transcript_*

2017-12-19 Thread Neels Hofmeyr

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

README: mention osmo_interact_* and osmo_verify_transcript_*

Move the libs/scripts that they (possibly) replace below the new additions and
mention that they are superseded.

Change-Id: Ic50e15d6cb6e94b6e171d954d75b94e09b22d548
---
M README
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/95/5495/1

diff --git a/README b/README
index 25be782..9694aba 100644
--- a/README
+++ b/README
@@ -7,10 +7,14 @@
 
 Use
 There are currently following scripts in this package:
-osmodumpdoc.py - dump documentation (the VTY's "show online-help").
 osmotestconfig.py - test that apps start/write with example configs
-osmotestvty.py - test vty operations (currently, tests very few)
 soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted
+osmo_interact_vty.py - pipe stdin/stdout to a VTY session
+osmo_interact_ctrl.py - pipe stdin/stdout to a CTRL port
+osmo_verify_transcript_vty.py - VTY testing by VTY session screen dumps
+osmo_verify_transcript_ctrl.py - CTRL testing by CTRL session script files
+osmodumpdoc.py - dump documentation, superseded by osmo_interact_vty.py -X
+osmotestvty.py - test vty operations, superseded by 
osmo_verify_transcript_vty.py
 
 Each of these scripts imports a project-specific osmoappdesc.py,
 which provides information about the available apps, configs, vty ports, etc.
@@ -24,9 +28,10 @@
 cd /openbsc/openbsc && osmodumpdoc.py
 
 Libraries:
-osmopy/obscvty.py - connect to a vty, run commands on it, see the result 
 osmopy/osmoutil.py - code that's shared between the scripts
 osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python
 twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted 
framework
+osmopy/osmo_interact/{vty,ctrl}.py - general interactions with VTY and CTRL 
ports
+osmopy/obscvty.py - connect to a vty, superseded by osmo_interact/vty
 
 obscvty.py may be of general use. osmoutil.py probably isn't.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic50e15d6cb6e94b6e171d954d75b94e09b22d548
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] python/osmo-python-tests[master]: README: mention twisted_ipa.py in scripts section, not as lib

2017-12-19 Thread Neels Hofmeyr

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

README: mention twisted_ipa.py in scripts section, not as lib

Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289
---
M README
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/96/5496/1

diff --git a/README b/README
index 9694aba..e85c1c4 100644
--- a/README
+++ b/README
@@ -13,6 +13,7 @@
 osmo_interact_ctrl.py - pipe stdin/stdout to a CTRL port
 osmo_verify_transcript_vty.py - VTY testing by VTY session screen dumps
 osmo_verify_transcript_ctrl.py - CTRL testing by CTRL session script files
+twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted 
framework
 osmodumpdoc.py - dump documentation, superseded by osmo_interact_vty.py -X
 osmotestvty.py - test vty operations, superseded by 
osmo_verify_transcript_vty.py
 
@@ -30,7 +31,6 @@
 Libraries:
 osmopy/osmoutil.py - code that's shared between the scripts
 osmopy/osmo_ipa.py - generic implementation of IPA and Ctrl protocols in python
-twisted_ipa.py - implementation of IPA and Ctrl protocols on top of Twisted 
framework
 osmopy/osmo_interact/{vty,ctrl}.py - general interactions with VTY and CTRL 
ports
 osmopy/obscvty.py - connect to a vty, superseded by osmo_interact/vty
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s...

2017-12-19 Thread Neels Hofmeyr

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

fix osmo_interact_* and osmo_verify_transcript_* after dir split

After I30cdf0f85b2a60a235960911c9827f4129da40db,
* the osmo_interact_{vty,ctrl}.py can no longer import osmo_interact_common,
  since it was moved to scripts/ in error.
* the osmo_verify_{vty,ctrl} scripts can no longer import 
osmo_interact_{vty,ctrl},
  since it is also in scripts/. Notably, the osmo_interact_{vty,ctrl}.py also
  served as scripts while being modules at the same time, which is not good.

Fix these issues by adding a new osmopy/osmo_interact/ submodule with
osmopy/osmo_interact/common.py, /vty.py and /ctrl.py as modules, and add in
scripts thin wrappers that invoke the modules' main().

Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05
---
M osmopy/__init__.py
A osmopy/osmo_interact/__init__.py
R osmopy/osmo_interact/common.py
A osmopy/osmo_interact/ctrl.py
A osmopy/osmo_interact/vty.py
M scripts/osmo_interact_ctrl.py
M scripts/osmo_interact_vty.py
M scripts/osmo_verify_transcript_ctrl.py
M scripts/osmo_verify_transcript_vty.py
9 files changed, 320 insertions(+), 314 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/92/5492/1

diff --git a/osmopy/__init__.py b/osmopy/__init__.py
index 6150ea4..35ee9d6 100644
--- a/osmopy/__init__.py
+++ b/osmopy/__init__.py
@@ -1,4 +1,4 @@
 #!/usr/bin/env python
 __version__ = '0.0.5'
 
-__all__ = ['obscvty', 'osmoutil', 'osmo_ipa']
+__all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_interact']
diff --git a/osmopy/osmo_interact/__init__.py b/osmopy/osmo_interact/__init__.py
new file mode 100644
index 000..4fc4fac
--- /dev/null
+++ b/osmopy/osmo_interact/__init__.py
@@ -0,0 +1,2 @@
+#!/usr/bin/env python
+__all__ = ['common', 'vty', 'ctrl']
diff --git a/scripts/osmo_interact_common.py b/osmopy/osmo_interact/common.py
similarity index 97%
rename from scripts/osmo_interact_common.py
rename to osmopy/osmo_interact/common.py
index 5efc22d..f7070ae 100644
--- a/scripts/osmo_interact_common.py
+++ b/osmopy/osmo_interact/common.py
@@ -24,6 +24,11 @@
 osmo_interact_{vty,ctrl}.py plug VTY and CTRL interface specific bits.
 '''
 
+# Our setup.py currently wants everything to be parsable by both py2 and py3.
+# IMHO that is not a good idea, but until that changes, let's just keep this
+# py2 legacy shim in here so we can syntax-check this py3 module with py2.
+from __future__ import print_function
+
 import argparse
 import sys
 import os
diff --git a/osmopy/osmo_interact/ctrl.py b/osmopy/osmo_interact/ctrl.py
new file mode 100755
index 000..b752351
--- /dev/null
+++ b/osmopy/osmo_interact/ctrl.py
@@ -0,0 +1,114 @@
+#!/usr/bin/env python3
+#
+# (C) 2017 by sysmocom s.f.m.c. GmbH 
+# All rights reserved.
+#
+# Author: Neels Hofmeyr 
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License
+# along with this program.  If not, see .
+
+'''
+Run CTRL commands or test transcripts against a given application.  Commandline
+invocation exposes only direct command piping, the transcript verification code
+is exposed as commandline args by osmo_verify_transcript_ctrl.py.
+'''
+
+import re
+
+from .common import *
+from osmopy.osmo_ipa import Ctrl, IPA
+
+class InteractCtrl(Interact):
+next_id = 1
+keep_ids = True
+re_command = re.compile('^(SET|GET) ([^ ]*) (.*)$')
+
+class CtrlStep(Interact.StepBase):
+
+@staticmethod
+def is_next_step(line, interact_instance):
+m = InteractCtrl.re_command.match(line)
+if not m:
+return None
+next_step = InteractCtrl.CtrlStep()
+
+set_get = m.group(1)
+cmd_id = m.group(2)
+var_val = m.group(3)
+if not interact_instance.keep_ids:
+cmd_id = interact_instance.next_id
+interact_instance.next_id += 1
+next_step.command = '%s %s %s' % (set_get, cmd_id, var_val)
+
+return next_step
+
+def __init__(self, port, host, verbose=False, update=False, keep_ids=True):
+if not update:
+keep_ids = True
+self.keep_ids = keep_ids
+super().__init__(InteractCtrl.CtrlStep, port=port, host=host, 
verbose=verbose, update=update)
+
+def connect(self):
+self.next_id = 1
+super().connect()
+
+def send(self, data):
+data = Ctrl().add_header(data)
+return self.socket.send(data) == len(data)
+
+def rec

python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s...

2017-12-19 Thread Max

Patch Set 1: Code-Review-1

(3 comments)

https://gerrit.osmocom.org/#/c/5492/1/osmopy/__init__.py
File osmopy/__init__.py:

Line 2: __version__ = '0.0.5'
Please bump the version to avoid confusion


https://gerrit.osmocom.org/#/c/5492/1/osmopy/osmo_interact/ctrl.py
File osmopy/osmo_interact/ctrl.py:

Line 101: def main_verify_transcript_ctrl():
Why this is here and not in actual script?


https://gerrit.osmocom.org/#/c/5492/1/scripts/osmo_interact_ctrl.py
File scripts/osmo_interact_ctrl.py:

Line 23: main_interact_ctrl()
Why not just use the function body directly? Is it used someplace else as well?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: Yes


[PATCH] osmo-hlr[master]: fix test_subscriber_errors.ctrl after libosmocore change

2017-12-19 Thread Neels Hofmeyr

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

fix test_subscriber_errors.ctrl after libosmocore change

libosmocore Ie35a02555b76913bb12734a76fc40fde7ffb244d
"ctrl: on parse errors, return a detailed message to sender"
the test_subscriber_errors.ctrl test fails.

Adjust the expected error message.

Change-Id: I3aee1507721cd073f72369150d0fb3cff0fdf66f
---
M tests/test_subscriber_errors.ctrl
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/tests/test_subscriber_errors.ctrl 
b/tests/test_subscriber_errors.ctrl
index 2f64fdb..55c7480 100644
--- a/tests/test_subscriber_errors.ctrl
+++ b/tests/test_subscriber_errors.ctrl
@@ -97,9 +97,9 @@
 ERROR 43 Value failed verification.
 
 SET 44 subscriber.by-imsi-9019901.ps-enabled
-ERROR err Command parser error.
+ERROR 44 SET incomplete
 SET 45 subscriber.by-imsi-9019901.cs-enabled
-ERROR err Command parser error.
+ERROR 45 SET incomplete
 
 GET 46 subscriber.by-imsi-1234567890123456.ps-enabled
 ERROR 46 Invalid value part of 'by-xxx-value' selector.

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

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


osmo-hlr[master]: fix test_subscriber_errors.ctrl after libosmocore change

2017-12-19 Thread Neels Hofmeyr

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3aee1507721cd073f72369150d0fb3cff0fdf66f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[MERGED] osmo-hlr[master]: fix test_subscriber_errors.ctrl after libosmocore change

2017-12-19 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: fix test_subscriber_errors.ctrl after libosmocore change
..


fix test_subscriber_errors.ctrl after libosmocore change

libosmocore Ie35a02555b76913bb12734a76fc40fde7ffb244d
"ctrl: on parse errors, return a detailed message to sender"
the test_subscriber_errors.ctrl test fails.

Adjust the expected error message.

Change-Id: I3aee1507721cd073f72369150d0fb3cff0fdf66f
---
M tests/test_subscriber_errors.ctrl
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/tests/test_subscriber_errors.ctrl 
b/tests/test_subscriber_errors.ctrl
index 2f64fdb..55c7480 100644
--- a/tests/test_subscriber_errors.ctrl
+++ b/tests/test_subscriber_errors.ctrl
@@ -97,9 +97,9 @@
 ERROR 43 Value failed verification.
 
 SET 44 subscriber.by-imsi-9019901.ps-enabled
-ERROR err Command parser error.
+ERROR 44 SET incomplete
 SET 45 subscriber.by-imsi-9019901.cs-enabled
-ERROR err Command parser error.
+ERROR 45 SET incomplete
 
 GET 46 subscriber.by-imsi-1234567890123456.ps-enabled
 ERROR 46 Invalid value part of 'by-xxx-value' selector.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3aee1507721cd073f72369150d0fb3cff0fdf66f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s...

2017-12-19 Thread Neels Hofmeyr

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/5492/1/osmopy/osmo_interact/ctrl.py
File osmopy/osmo_interact/ctrl.py:

Line 101: def main_verify_transcript_ctrl():
> Why this is here and not in actual script?
personal preference. that code was so alone in that file way over there in 
../scripts/


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[PATCH] python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s...

2017-12-19 Thread Neels Hofmeyr
Hello Max, Jenkins Builder,

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

https://gerrit.osmocom.org/5492

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

fix osmo_interact_* and osmo_verify_transcript_* after dir split

After I30cdf0f85b2a60a235960911c9827f4129da40db,
* the osmo_interact_{vty,ctrl}.py can no longer import osmo_interact_common,
  since it was moved to scripts/ in error.
* the osmo_verify_{vty,ctrl} scripts can no longer import 
osmo_interact_{vty,ctrl},
  since it is also in scripts/. Notably, the osmo_interact_{vty,ctrl}.py also
  served as scripts while being modules at the same time, which is not good.

Fix these issues by adding a new osmopy/osmo_interact/ submodule with
osmopy/osmo_interact/common.py, /vty.py and /ctrl.py as modules, and add in
scripts thin wrappers that invoke the modules' main().

Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05
---
M osmopy/__init__.py
A osmopy/osmo_interact/__init__.py
R osmopy/osmo_interact/common.py
A osmopy/osmo_interact/ctrl.py
A osmopy/osmo_interact/vty.py
M scripts/osmo_interact_ctrl.py
M scripts/osmo_interact_vty.py
M scripts/osmo_verify_transcript_ctrl.py
M scripts/osmo_verify_transcript_vty.py
9 files changed, 321 insertions(+), 315 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/92/5492/2

diff --git a/osmopy/__init__.py b/osmopy/__init__.py
index 6150ea4..b1b0651 100644
--- a/osmopy/__init__.py
+++ b/osmopy/__init__.py
@@ -1,4 +1,4 @@
 #!/usr/bin/env python
-__version__ = '0.0.5'
+__version__ = '0.0.6'
 
-__all__ = ['obscvty', 'osmoutil', 'osmo_ipa']
+__all__ = ['obscvty', 'osmoutil', 'osmo_ipa', 'osmo_interact']
diff --git a/osmopy/osmo_interact/__init__.py b/osmopy/osmo_interact/__init__.py
new file mode 100644
index 000..4fc4fac
--- /dev/null
+++ b/osmopy/osmo_interact/__init__.py
@@ -0,0 +1,2 @@
+#!/usr/bin/env python
+__all__ = ['common', 'vty', 'ctrl']
diff --git a/scripts/osmo_interact_common.py b/osmopy/osmo_interact/common.py
similarity index 97%
rename from scripts/osmo_interact_common.py
rename to osmopy/osmo_interact/common.py
index 5efc22d..f7070ae 100644
--- a/scripts/osmo_interact_common.py
+++ b/osmopy/osmo_interact/common.py
@@ -24,6 +24,11 @@
 osmo_interact_{vty,ctrl}.py plug VTY and CTRL interface specific bits.
 '''
 
+# Our setup.py currently wants everything to be parsable by both py2 and py3.
+# IMHO that is not a good idea, but until that changes, let's just keep this
+# py2 legacy shim in here so we can syntax-check this py3 module with py2.
+from __future__ import print_function
+
 import argparse
 import sys
 import os
diff --git a/osmopy/osmo_interact/ctrl.py b/osmopy/osmo_interact/ctrl.py
new file mode 100755
index 000..b752351
--- /dev/null
+++ b/osmopy/osmo_interact/ctrl.py
@@ -0,0 +1,114 @@
+#!/usr/bin/env python3
+#
+# (C) 2017 by sysmocom s.f.m.c. GmbH 
+# All rights reserved.
+#
+# Author: Neels Hofmeyr 
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License
+# along with this program.  If not, see .
+
+'''
+Run CTRL commands or test transcripts against a given application.  Commandline
+invocation exposes only direct command piping, the transcript verification code
+is exposed as commandline args by osmo_verify_transcript_ctrl.py.
+'''
+
+import re
+
+from .common import *
+from osmopy.osmo_ipa import Ctrl, IPA
+
+class InteractCtrl(Interact):
+next_id = 1
+keep_ids = True
+re_command = re.compile('^(SET|GET) ([^ ]*) (.*)$')
+
+class CtrlStep(Interact.StepBase):
+
+@staticmethod
+def is_next_step(line, interact_instance):
+m = InteractCtrl.re_command.match(line)
+if not m:
+return None
+next_step = InteractCtrl.CtrlStep()
+
+set_get = m.group(1)
+cmd_id = m.group(2)
+var_val = m.group(3)
+if not interact_instance.keep_ids:
+cmd_id = interact_instance.next_id
+interact_instance.next_id += 1
+next_step.command = '%s %s %s' % (set_get, cmd_id, var_val)
+
+return next_step
+
+def __init__(self, port, host, verbose=False, update=False, keep_ids=True):
+if not update:
+keep_ids = True
+self.keep_ids = keep_ids
+super().__init__(InteractCtrl.CtrlStep, port=port, host=host, 
verbose=verbose, update=update)
+
+def connect(self):
+self.next_id = 1
+super().connect()
+
+ 

python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s...

2017-12-19 Thread Neels Hofmeyr

Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/5492/2/osmopy/osmo_interact/ctrl.py
File osmopy/osmo_interact/ctrl.py:

Line 1: #!/usr/bin/env python3
(this is actually mostly a file rename from scripts/osmo_interact_ctrl.py, no 
idea why gerrit doesn't pick up the rename.)


https://gerrit.osmocom.org/#/c/5492/2/osmopy/osmo_interact/vty.py
File osmopy/osmo_interact/vty.py:

Line 1: #!/usr/bin/env python3
(this is actually mostly a file rename from scripts/osmo_interact_vty.py, no 
idea why gerrit doesn't pick up the rename.)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05
Gerrit-PatchSet: 2
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[PATCH] python/osmo-python-tests[master]: Add rate counter dumper

2017-12-19 Thread Max
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/5029

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

Add rate counter dumper

This simple tool dump all the rate counters available via ctrl interface
to cvs file (or stdout).

Change-Id: I12b369434e4ee9b38f92872f297e1f3d4f0698c2
Fixes: OS#2550
---
M README
M contrib/jenkins.sh
A scripts/osmo_rate_ctr2csv.py
M setup.py
4 files changed, 89 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/29/5029/7

diff --git a/README b/README
index 25be782..5b02bfa 100644
--- a/README
+++ b/README
@@ -11,6 +11,7 @@
 osmotestconfig.py - test that apps start/write with example configs
 osmotestvty.py - test vty operations (currently, tests very few)
 soap.py - implementation of SOAP <-> Ctrl proxy implemented on top of Twisted
+osmo_rate_ctr2csv.py - rate counter dumper on top of osmo_ipa
 
 Each of these scripts imports a project-specific osmoappdesc.py,
 which provides information about the available apps, configs, vty ports, etc.
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 36f3336..126f66b 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -15,6 +15,7 @@
 
 python3 -m compileall osmopy
 python3 -m compileall scripts/osmo_ctrl.py
+python3 -m compileall scripts/osmo_rate_ctr2csv.py
 python3 -m compileall scripts/osmo_interact_common.py
 python3 -m compileall scripts/osmo_interact_ctrl.py
 python3 -m compileall scripts/osmo_interact_vty.py
diff --git a/scripts/osmo_rate_ctr2csv.py b/scripts/osmo_rate_ctr2csv.py
new file mode 100644
index 000..1e3fc9f
--- /dev/null
+++ b/scripts/osmo_rate_ctr2csv.py
@@ -0,0 +1,86 @@
+#!/usr/bin/python3
+# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
+"""
+/*
+ * Copyright (C) 2017 sysmocom s.f.m.c. GmbH
+ *
+ * All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+"""
+
+from osmopy.osmo_ipa import Ctrl
+import socket, argparse, sys, logging, csv
+
+__version__ = "0.0.1" # bump this on every non-trivial change
+
+def connect(host, port):
+sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+sck.setblocking(1)
+sck.connect((host, port))
+return sck
+
+def get_var(sck, var):
+(_, c) = Ctrl().cmd(var, None)
+sck.send(c)
+return Ctrl().parse_kv(sck.recv(4096))
+
+def get_interval(group_name, group_counters, interval):
+log.debug('Getting %s counter values: %s...' % (group_name, interval))
+(_, c) = get_var(sock, 'rate_ctr.%s.%s' % (interval, group_name))
+for ctr in c.split(';'):
+if len(ctr):
+(k, v) = ctr.split()
+group_counters[k] = group_counters.get(k, 
(group_name,)) + (v,)
+return len(group_counters)
+
+
+if __name__ == '__main__':
+p = argparse.ArgumentParser(description='Dump rate counters into csv 
via Osmocom CTRL protocol.')
+p.add_argument('-v', '--version', action='version', version=("%(prog)s 
v" + __version__))
+p.add_argument('-p', '--port', type=int, default=4249, help="Port to 
use for CTRL interface, defaults to 4249")
+p.add_argument('-c', '--ctrl', default='localhost', help="Adress to 
use for CTRL interface, defaults to localhost")
+p.add_argument('-d', '--debug', action='store_true', help="Enable 
debug log")
+p.add_argument('--header', action='store_true', help="Prepend column 
header to output")
+p.add_argument('-o', '--output', nargs='?', 
type=argparse.FileType('w'), default=sys.stdout, help="Output file, defaults to 
stdout")
+args = p.parse_args()
+
+log = logging.getLogger('rate_ctr2csv')
+log.setLevel(logging.DEBUG if args.debug else logging.INFO)
+log.addHandler(logging.StreamHandler(sys.stderr))
+
+log.info('Connecting to %s:%d...' % (args.ctrl, args.port))
+sock = connect(args.ctrl, args.port)
+
+log.info('Getting rate counter groups info...')
+(_, g) = get_var(sock, 'rate_ctr.*')
+
+w = csv.writer(args.output, dialect='unix')
+total_groups = 0
+total_rows = 0
+
+if args.header:
+w.writerow(['group', 'counter', 'absolute', 'second', 

[PATCH] python/osmo-python-tests[master]: Ignore compilation byproducts

2017-12-19 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5483

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

Ignore compilation byproducts

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


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/83/5483/3

diff --git a/.gitignore b/.gitignore
index 766f495..095d598 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,4 @@
 osmopython.egg-info/
+*.pyc
+build/
+dist/

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ic04a1b9411b851547ef7ce7a9b562cb290081ca9
Gerrit-PatchSet: 3
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 


[PATCH] python/osmo-python-tests[master]: Improve python3 compatibility

2017-12-19 Thread Max
Hello Neels Hofmeyr, Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/5038

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

Improve python3 compatibility

Use proper print() function to make scripts compatible with both python
2 and 3. This paves the way to deprecating python 2 support altogether.

Change-Id: I80e5850a8978d78cda793e2192ef4bd3fd54a121
---
M contrib/jenkins.sh
M scripts/osmodumpdoc.py
M scripts/osmotestconfig.py
M scripts/osmotestvty.py
M setup.py
5 files changed, 33 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/38/5038/4

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index 126f66b..749f57a 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -19,6 +19,9 @@
 python3 -m compileall scripts/osmo_interact_common.py
 python3 -m compileall scripts/osmo_interact_ctrl.py
 python3 -m compileall scripts/osmo_interact_vty.py
+python3 -m compileall scripts/osmodumpdoc.py
+python3 -m compileall scripts/osmotestvty.py
+python3 -m compileall scripts/osmotestconfig.py
 python3 -m compileall scripts/osmo_verify_transcript_ctrl.py
 python3 -m compileall scripts/osmo_verify_transcript_vty.py
 python3 -m compileall scripts/soap.py
diff --git a/scripts/osmodumpdoc.py b/scripts/osmodumpdoc.py
index 2464b05..d71edc8 100644
--- a/scripts/osmodumpdoc.py
+++ b/scripts/osmodumpdoc.py
@@ -4,7 +4,7 @@
 # Fixes may need to be applied to both.
 
 """Start the process and dump the documentation to the doc dir."""
-
+from __future__ import print_function
 import subprocess
 import time
 import os
@@ -21,7 +21,7 @@
 out = open(filename, 'w')
 out.write(xml)
 out.close()
-print 'generated %r' % filename
+print('generated %r' % filename)
 
 
 """Dump the config of all the apps.
@@ -40,22 +40,22 @@
 
 for app in apps:
 appname = app[3]
-print "Starting app for %s" % appname
+print("Starting app for %s" % appname)
 proc = None
 cmd = [app[1], "-c", os.path.join(confpath, configs[appname][0])]
-print 'cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd)
+print('cd', os.path.abspath(os.path.curdir), ';', ' '.join(cmd))
 try:
 proc = subprocess.Popen(cmd, stdin=None, stdout=None)
 except OSError as e:  # Probably a missing binary
-print >> sys.stderr, e
-print >> sys.stderr, "Skipping app %s" % appname
+print(e, file=sys.stderr)
+print("Skipping app %s" % appname, file=sys.stderr)
 failures += 1
 else:
 try:
 dump_doc(app[2], app[0], 'doc/%s_vty_reference.xml' % appname)
 successes += 1
 except IOError:  # Generally a socket issue
-print >> sys.stderr, "%s: couldn't connect, skipping" % appname
+print("%s: couldn't connect, skipping" % appname, 
file=sys.stderr)
 failures += 1
 finally:
 osmoutil.end_proc(proc)
@@ -90,7 +90,7 @@
 num_fails, num_sucs = dump_configs(
 osmoappdesc.apps, osmoappdesc.app_configs, confpath)
 if num_fails > 0:
-print >> sys.stderr, "Warning: Skipped %s apps" % num_fails
+print("Warning: Skipped %s apps" % num_fails, file=sys.stderr)
 if 0 == num_sucs:
-print >> sys.stderr, "Nothing run, wrong working dir? Set with -w"
+print("Nothing run, wrong working dir? Set with -w", 
file=sys.stderr)
 sys.exit(num_fails)
diff --git a/scripts/osmotestconfig.py b/scripts/osmotestconfig.py
index 2132c43..f227504 100644
--- a/scripts/osmotestconfig.py
+++ b/scripts/osmotestconfig.py
@@ -13,7 +13,7 @@
 
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see .
-
+from __future__ import print_function
 import os
 import os.path
 import time
@@ -52,7 +52,7 @@
 try:
 cmd = app_desc[1].split(' ') + [ "-c", config]
 if verbose:
-print "Verifying %s, test %s" % (' '.join(cmd), run_test.__name__)
+print("Verifying %s, test %s" % (' '.join(cmd), run_test.__name__))
 
 proc = osmoutil.popen_devnull(cmd)
 end = app_desc[2]
@@ -61,10 +61,10 @@
 ret = run_test(vty)
 
 except IOError as se:
-print >> sys.stderr, "Failed to verify %s" % ' '.join(cmd)
-print >> sys.stderr, "Current directory: %s" % os.getcwd()
-print >> sys.stderr, "Error was %s" % se
-print >> sys.stderr, "Config was\n%s" % open(config).read()
+print("Failed to verify %s" % ' '.join(cmd), file=sys.stderr)
+print("Current directory: %s" % os.getcwd(), file=sys.stderr)
+print("Error was %s" % se, file=sys.stderr)
+print("Config was\n%s" % open(config).read(), file=sys.stderr)
 raise se
 
 finally:
@@ -125,9 +125,8 @@
 
 all_errs.appen

[PATCH] python/osmo-python-tests[master]: Update ctrl command parsing for python3

2017-12-19 Thread Max
Hello Neels Hofmeyr, Jenkins Builder,

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

https://gerrit.osmocom.org/5028

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

Update ctrl command parsing for python3

* make parse() return command id in addition to variable name and value
* introduce parse_kv() wrapper which ignores that id and use it instead
  of old parse()
* make parse() compatible with python3 where we got bytes, not string
  from the socket so we have to decode it properly before using split()
* expand test_py3.py with simply asyn server which verifies that
  osmo_ctrl.py works properly

Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1
---
M contrib/jenkins.sh
M osmopy/osmo_ipa.py
M scripts/osmo_ctrl.py
M scripts/twisted_ipa.py
M tests/test_py3.py
5 files changed, 84 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests 
refs/changes/28/5028/5

diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index cce89f2..36f3336 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -12,7 +12,7 @@
 
 rm -rf ./build
 python3 ./setup.py install
-python3 tests/test_py3.py
+
 python3 -m compileall osmopy
 python3 -m compileall scripts/osmo_ctrl.py
 python3 -m compileall scripts/osmo_interact_common.py
@@ -23,7 +23,7 @@
 python3 -m compileall scripts/soap.py
 python3 -m compileall scripts/twisted_ipa.py
 
-cd scripts
-./osmo_ctrl.py --help
+# Run async server which tests scripts/osmo_ctrl.py interaction
+python3 tests/test_py3.py
 
 # TODO: add more tests
diff --git a/osmopy/osmo_ipa.py b/osmopy/osmo_ipa.py
index 71cbf45..afabf67 100755
--- a/osmopy/osmo_ipa.py
+++ b/osmopy/osmo_ipa.py
@@ -28,7 +28,7 @@
 """
 Stateless IPA protocol multiplexer: add/remove/parse (extended) header
 """
-version = "0.0.5"
+version = "0.0.6"
 TCP_PORT_OML = 3002
 TCP_PORT_RSL = 3003
 # OpenBSC extensions: OSMO, MGCP_OLD
@@ -231,23 +231,33 @@
 return None
 return d
 
-def parse(self, data, op=None):
+def parse(self, raw_data):
+"""
+Parse Ctrl string returning (id, var, value) tuple
+var could be None in case of ERROR message
+value could be None in case of GET message
+both could be None in case of TRAP with non-zero id
+"""
+data = self.rem_header(raw_data).decode('utf-8')
+(s, i, v) = data.split(' ', 2)
+if s == self.CTRL_ERR:
+return i, None, v
+if s == self.CTRL_GET:
+return i, v, None
+if s == self.CTRL_GET + '_' + self.CTRL_REP:
+return i, v, None
+(s, i, var, val) = data.split(' ', 3)
+if s == self.CTRL_TRAP and i != '0':
+return i, None, None
+return i, var, val
+
+def parse_kv(self, raw_data):
 """
 Parse Ctrl string returning (var, value) pair
 var could be None in case of ERROR message
 value could be None in case of GET message
 """
-(s, i, v) = data.split(' ', 2)
-if s == self.CTRL_ERR:
-return None, v
-if s == self.CTRL_GET:
-return v, None
-(s, i, var, val) = data.split(' ', 3)
-if s == self.CTRL_TRAP and i != '0':
-return None, '%s with non-zero id %s' % (s, i)
-if op is not None and i != op:
-if s == self.CTRL_GET + '_' + self.CTRL_REP or s == self.CTRL_SET 
+ '_' + self.CTRL_REP:
-return None, '%s with unexpected id %s' % (s, i)
+(i, var, val) = self.parse(raw_data)
 return var, val
 
 def trap(self, var, val):
@@ -265,11 +275,19 @@
 return r, self.add_header("%s %s %s %s" % (self.CTRL_SET, r, var, 
val))
 return r, self.add_header("%s %s %s" % (self.CTRL_GET, r, var))
 
+def reply(self, op_id, var, val=None):
+"""
+Make SET/GET command reply: returns assembled message
+"""
+if val is not None:
+return self.add_header("%s_%s %s %s %s" % (self.CTRL_SET, 
self.CTRL_REP, op_id, var, val))
+return self.add_header("%s_%s %s %s" % (self.CTRL_GET, self.CTRL_REP, 
op_id, var))
+
 def verify(self, reply, r, var, val=None):
 """
 Verify reply to SET/GET command: returns (b, v) tuple where v is 
True/False verification result and v is the variable value
 """
-(k, v) = self.parse(reply)
+(k, v) = self.parse_kv(reply)
 if k != var or (val is not None and v != val):
 return False, v
 return True, v
diff --git a/scripts/osmo_ctrl.py b/scripts/osmo_ctrl.py
index 8c0608f..ac20050 100755
--- a/scripts/osmo_ctrl.py
+++ b/scripts/osmo_ctrl.py
@@ -40,8 +40,8 @@
 def do_set_get(sck, var, value = None):
 (r, c) = Ctrl().cmd(var, value)
 sck.send(c)
-answer = Ctrl().rem_header(sck.recv(4096))
-return (answer,) + Ctrl().verify(answer, r, var, value)
+ret = sck.recv(4096)
+return (Ctrl().rem_header(ret),) +

python/osmo-python-tests[master]: scripts: add symlink to osmopy

2017-12-19 Thread Max

Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I880c8afa8d02ef112a80cb54f649ec71902bbd4c
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


python/osmo-python-tests[master]: README: mention twisted_ipa.py in scripts section, not as lib

2017-12-19 Thread Max

Patch Set 1: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie536d61c5af89a530533b22d8ecab1c804a38289
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-HasComments: No


[PATCH] osmo-iuh[master]: ranap_msg_factory: remove unusued variable

2017-12-19 Thread dexter

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

ranap_msg_factory: remove unusued variable

remove variable i in ranap_new_msg_sec_mod_compl() as it is not
used (compiler warning)

Change-Id: I93d9e95109fb78bc6cc161745b9e14de8b623d4f
---
M src/ranap_msg_factory.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/00/5500/1

diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c
index 9611794..0de4ea1 100644
--- a/src/ranap_msg_factory.c
+++ b/src/ranap_msg_factory.c
@@ -279,7 +279,7 @@
RANAP_SecurityModeCompleteIEs_t ies;
RANAP_SecurityModeComplete_t out;
struct msgb *msg;
-   int i, rc;
+   int rc;
 
memset(&ies, 0, sizeof(ies));
memset(&out, 0, sizeof(out));

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93d9e95109fb78bc6cc161745b9e14de8b623d4f
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-iuh[master]: iu: iu_helpers: add functions to decode ip/port from rab-ass

2017-12-19 Thread dexter

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

iu: iu_helpers: add functions to decode ip/port from rab-ass

add ranap_transp_assoc_decode() to decode the port information from
an  RANAP_IuTransportAssociation_t field.

add ranap_transp_layer_addr_decode() to decode the ip-address from
an RANAP_TransportLayerAddress_t field.

Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062
---
M include/osmocom/ranap/iu_helpers.h
M src/iu_helpers.c
2 files changed, 52 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/98/5498/1

diff --git a/include/osmocom/ranap/iu_helpers.h 
b/include/osmocom/ranap/iu_helpers.h
index 109b6da..56791b8 100644
--- a/include/osmocom/ranap/iu_helpers.h
+++ b/include/osmocom/ranap/iu_helpers.h
@@ -3,5 +3,10 @@
 #include 
 #include 
 
+#include 
+#include 
+
 int ranap_bcd_decode(char *out, size_t out_len, const uint8_t *in, size_t 
in_len);
 int ranap_imsi_encode(uint8_t *out, size_t out_len, const char *in);
+int ranap_transp_assoc_decode(uint16_t *port, RANAP_IuTransportAssociation_t 
*transp_assoc);
+int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len, 
RANAP_TransportLayerAddress_t *trasp_layer_addr);
diff --git a/src/iu_helpers.c b/src/iu_helpers.c
index 2f44e93..f038da2 100644
--- a/src/iu_helpers.c
+++ b/src/iu_helpers.c
@@ -20,8 +20,11 @@
 
 #include 
 #include 
-
+#include 
+#include "asn1helpers.h"
 #include 
+#include 
+#include 
 
 /* decode a BCD-string as used inside ASN.1 encoded Iu interface protocols */
 int ranap_bcd_decode(char *out, size_t out_len, const uint8_t *in, size_t 
in_len)
@@ -70,3 +73,46 @@
}
return i;
 }
+
+/* decode a network port as used inside ASN.1 encoded Iu interface protocols */
+int ranap_transp_assoc_decode(uint16_t *port, RANAP_IuTransportAssociation_t * 
transp_assoc)
+{
+   uint32_t result;
+
+   if (!transp_assoc)
+   return -EINVAL;
+
+   result = asn1bitstr_to_u32((BIT_STRING_t *) & 
transp_assoc->choice.bindingID);
+
+   /* The lower 16 bits should be zero, otherwise the decoding may
+* have yielded some odd result */
+   if (result & 0x)
+   return -EINVAL;
+
+   *port = (uint16_t) ((result >> 16) & 0x);
+
+   if (*port == 0)
+   return -EINVAL;
+
+   return 0;
+}
+
+/* decode a network address as used inside ASN.1 encoded Iu interface 
protocols */
+int ranap_transp_layer_addr_decode(char *addr, unsigned int addr_len, 
RANAP_TransportLayerAddress_t * trasp_layer_addr)
+{
+   unsigned char *buf;
+   int len;
+
+   buf = trasp_layer_addr->buf;
+   len = trasp_layer_addr->size;
+
+   if (addr_len > INET_ADDRSTRLEN)
+   return -EINVAL;
+
+   if (buf[0] == 0x35 && len > 7)
+   snprintf(addr, addr_len, "%u.%u.%u.%u", buf[3], buf[4], buf[5], 
buf[6]);
+   else if (len > 3)
+   snprintf(addr, addr_len, "%u.%u.%u.%u", buf[0], buf[1], buf[2], 
buf[3]);
+
+   return 0;
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c1a0455c5f25cae41ee19229d6daf299e023062
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: dexter 


[PATCH] osmo-iuh[master]: ranap_msg_factory: check IE encoder return codes

2017-12-19 Thread dexter

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

ranap_msg_factory: check IE encoder return codes

in many functions, the returncode (rc) from the IE encoder functions
is not checked.

Add a return code check and log error message (like it is already
done in the functions which already check the return code)

Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae
---
M src/ranap_msg_factory.c
1 file changed, 35 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/99/5499/1

diff --git a/src/ranap_msg_factory.c b/src/ranap_msg_factory.c
index fe7e325..9611794 100644
--- a/src/ranap_msg_factory.c
+++ b/src/ranap_msg_factory.c
@@ -185,6 +185,10 @@
 
/* ies -> dt */
rc = ranap_encode_directtransferies(&dt, &ies);
+   if (rc < 0) {
+   LOGP(DRANAP, LOGL_ERROR, "error encoding direct transfer IEs: 
%d\n", rc);
+   return NULL;
+   }
 
/* dt -> msg */
msg = 
ranap_generate_initiating_message(RANAP_ProcedureCode_id_DirectTransfer,
@@ -245,6 +249,10 @@
 
/* ies -> out */
rc = ranap_encode_securitymodecommandies(&out, &ies);
+   if (rc < 0) {
+   LOGP(DRANAP, LOGL_ERROR, "error encoding security mode command 
IEs: %d\n", rc);
+   return NULL;
+   }
 
/* release dynamic allocations attached to ies */

ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_IntegrityProtectionInformation, 
&ies.integrityProtectionInformation);
@@ -282,6 +290,10 @@
 
/* ies -> out */
rc = ranap_encode_securitymodecompleteies(&out, &ies);
+   if (rc < 0) {
+   LOGP(DRANAP, LOGL_ERROR, "error encoding security mode complete 
IEs: %d\n", rc);
+   return NULL;
+   }
 
/* out -> msg */
msg = 
ranap_generate_successful_outcome(RANAP_ProcedureCode_id_SecurityModeControl,
@@ -317,6 +329,11 @@
 
/* ies -> out */
rc = ranap_encode_commonid_ies(&out, &ies);
+   if (rc < 0) {
+   LOGP(DRANAP, LOGL_ERROR, "error encoding common id IEs: %d\n", 
rc);
+   return NULL;
+   }
+
/* release dynamic allocations attached to ies */
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_PermanentNAS_UE_ID, 
&ies.permanentNAS_UE_ID);
if (rc < 0)
@@ -349,8 +366,10 @@
 
/* ies -> out */
rc = ranap_encode_iu_releasecommandies(&out, &ies);
-   if (rc < 0)
+   if (rc < 0) {
+   LOGP(DRANAP, LOGL_ERROR, "error encoding release command IEs: 
%d\n", rc);
return NULL;
+   }
 
/* out -> msg */
msg = 
ranap_generate_initiating_message(RANAP_ProcedureCode_id_Iu_Release,
@@ -377,8 +396,10 @@
 
/* ies -> out */
rc = ranap_encode_iu_releasecompleteies(&out, &ies);
-   if (rc < 0)
+   if (rc < 0) {
+   LOGP(DRANAP, LOGL_ERROR, "error encoding release complete IEs: 
%d\n", rc);
return NULL;
+   }
 
/* out -> msg */
msg = 
ranap_generate_successful_outcome(RANAP_ProcedureCode_id_Iu_Release,
@@ -434,6 +455,11 @@
 
/* ies -> out */
rc = ranap_encode_pagingies(&out, &ies);
+   if (rc < 0) {
+   LOGP(DRANAP, LOGL_ERROR, "error encoding paging IEs: %d\n", rc);
+   return NULL;
+   }
+
/* release dynamic allocation attached to ies */
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_PermanentNAS_UE_ID, 
&ies.permanentNAS_UE_ID);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_TemporaryUE_ID, 
&ies.temporaryUE_ID);
@@ -879,8 +905,10 @@
memcpy(&ies.cause, cause, sizeof(ies.cause));
 
rc = ranap_encode_iu_releaserequesties(&out, &ies);
-   if (rc < 0)
+   if (rc < 0) {
+   LOGP(DRANAP, LOGL_ERROR, "error encoding release request IEs: 
%d\n", rc);
return NULL;
+   }
 
/* encode the output into the msgb */
msg = 
ranap_generate_initiating_message(RANAP_ProcedureCode_id_Iu_ReleaseRequest,
@@ -915,8 +943,11 @@
 
/* encoe the list IEs into the output */
rc = ranap_encode_rab_releaserequesties(&out, &ies);
-   if (rc < 0)
+   if (rc < 0) {
+   LOGP(DRANAP, LOGL_ERROR, "error encoding release request IEs: 
%d\n", rc);
return NULL;
+   }
+
/* 'out' has been generated, we can release the input */
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_ReleaseList, 
&ies.raB_ReleaseList);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I592c0794a94c50fde5c574b1e9bc581eb28af4ae
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: dexter 


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

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

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

https://gerrit.osmocom.org/4980

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

mgcp: use osmo-mgw to switch rtp streams

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

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

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


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

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

[PATCH] osmo-bsc[master]: Remove unneeded .py scripts

2017-12-19 Thread Max

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

Remove unneeded .py scripts

The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for
vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py
are not BSC-specific: leftovers from repository split which are now
available in osmo-python-tests as well.

Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1
---
M Makefile.am
M configure.ac
D contrib/Makefile.am
D contrib/bsc_control.py
D contrib/ipa.py
D contrib/soap.py
D contrib/twisted_ipa.py
M tests/ctrl_test_runner.py
M tests/vty_test_runner.py
9 files changed, 2 insertions(+), 983 deletions(-)


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

diff --git a/Makefile.am b/Makefile.am
index 690deae..2f0a786 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,6 @@
include \
src \
tests \
-   contrib \
$(NULL)
 
 BUILT_SOURCES = $(top_srcdir)/.version
diff --git a/configure.ac b/configure.ac
index b7dd016..bdcf026 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,5 +167,4 @@
 tests/bssap/Makefile
 doc/Makefile
 doc/examples/Makefile
-contrib/Makefile
 Makefile)
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
deleted file mode 100644
index db6d0f5..000
--- a/contrib/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = ipa.py
diff --git a/contrib/bsc_control.py b/contrib/bsc_control.py
deleted file mode 100755
index c1b09ce..000
--- a/contrib/bsc_control.py
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/python
-# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
-"""
-/*
- * Copyright (C) 2016 sysmocom s.f.m.c. GmbH
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-"""
-
-from optparse import OptionParser
-from ipa import Ctrl
-import socket
-
-verbose = False
-
-def connect(host, port):
-if verbose:
-print "Connecting to host %s:%i" % (host, port)
-
-sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-sck.setblocking(1)
-sck.connect((host, port))
-return sck
-
-def do_set_get(sck, var, value = None):
-(r, c) = Ctrl().cmd(var, value)
-sck.send(c)
-answer = Ctrl().rem_header(sck.recv(4096))
-return (answer,) + Ctrl().verify(answer, r, var, value)
-
-def set_var(sck, var, val):
-(a, _, _) = do_set_get(sck, var, val)
-return a
-
-def get_var(sck, var):
-(_, _, v) = do_set_get(sck, var)
-return v
-
-def _leftovers(sck, fl):
-"""
-Read outstanding data if any according to flags
-"""
-try:
-data = sck.recv(1024, fl)
-except socket.error as (s_errno, strerror):
-return False
-if len(data) != 0:
-tail = data
-while True:
-(head, tail) = Ctrl().split_combined(tail)
-print "Got message:", Ctrl().rem_header(head)
-if len(tail) == 0:
-break
-return True
-return False
-
-if __name__ == '__main__':
-parser = OptionParser("Usage: %prog [options] var [value]")
-parser.add_option("-d", "--host", dest="host",
-  help="connect to HOST", metavar="HOST")
-parser.add_option("-p", "--port", dest="port", type="int",
-  help="use PORT", metavar="PORT", default=4249)
-parser.add_option("-g", "--get", action="store_true",
-  dest="cmd_get", help="perform GET operation")
-parser.add_option("-s", "--set", action="store_true",
-  dest="cmd_set", help="perform SET operation")
-parser.add_option("-v", "--verbose", action="store_true",
-  dest="verbose", help="be verbose", default=False)
-parser.add_option("-m", "--monitor", action="store_true",
-  dest="monitor", help="monitor the connection for 
traps", default=False)
-
-(options, args) = parser.parse_args()
-
-verbose = options.verbose
-
-if options.cmd_set and options.cmd_get:
-parser.error("Get and set options are mutually exclusive!")
-
-if not (options.cmd

[PATCH] osmo-bsc[master]: gsm_data.h: Document all fields of gsm_subscriber_connection

2017-12-19 Thread Harald Welte

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

gsm_data.h: Document all fields of gsm_subscriber_connection

Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0
---
M include/osmocom/bsc/gsm_data.h
1 file changed, 14 insertions(+), 8 deletions(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 1cedef0..2e97055 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -75,20 +75,26 @@
/* libbsc subscriber information (if available) */
struct bsc_subscr *bsub;
 
-   /* bsc structures */
-   struct osmo_bsc_sccp_con *sccp_con; /* BSC */
+   /* SCCP connection associatd with this subscriber_connection */
+   struct osmo_bsc_sccp_con *sccp_con;
 
/* back pointers */
struct gsm_network *network;
 
-   struct gsm_lchan *lchan; /* BSC */
-   struct gsm_lchan *ho_lchan; /* BSC */
-   struct gsm_bts *bts; /* BSC */
+   /* the primary / currently active lchan to the BTS/subscriber */
+   struct gsm_lchan *lchan;
+   /* the future/allocated but not yet used lchan during HANDOVER */
+   struct gsm_lchan *ho_lchan;
+   /* a short-hand pointer to the BTS currently serving the subscriber,
+* points to gsm_subscriber_connection.lchan->ts->trx->bts */
+   struct gsm_bts *bts;
 
-   /* for assignment handling */
-   struct osmo_timer_list T10; /* BSC */
-   struct gsm_lchan *secondary_lchan; /* BSC */
+   /* timer for assignment handling */
+   struct osmo_timer_list T10;
+   /* the future allocated but not yet used lchan during ASSIGNMENT */
+   struct gsm_lchan *secondary_lchan;
 
+   /* buffer/cache for classmark of the ME of the subscriber */
struct gsm_classmark classmark;
 
uint16_t lac;

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

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


[PATCH] osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures

2017-12-19 Thread Harald Welte

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

bsc_test.c: Use proper network/bts/lchan structures

don't mock them, simply call the respective functions to get
a gsm_network and a gsm_bts with all its subordinate members.

Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
---
M tests/bsc/bsc_test.c
1 file changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c
index 1d7baa1..420ef73 100644
--- a/tests/bsc/bsc_test.c
+++ b/tests/bsc/bsc_test.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -121,22 +122,20 @@
 {
int i;
 
-   struct gsm_network *net;
-   struct gsm_bts *bts;
+   struct gsm_network *net = bsc_network_init(NULL, 1, 1);
+   struct gsm_bts *bts = gsm_bts_alloc(net, 0);
struct osmo_bsc_sccp_con *sccp_con;
struct bsc_msc_data *msc;
struct gsm_subscriber_connection *conn;
 
-   net = talloc_zero(NULL, struct gsm_network);
-   bts = talloc_zero(net, struct gsm_bts);
sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con);
msc = talloc_zero(net, struct bsc_msc_data);
conn = talloc_zero(net, struct gsm_subscriber_connection);
 
bts->network = net;
sccp_con->msc = msc;
-   conn->bts = bts;
conn->sccp_con = sccp_con;
+   conn->lchan = &bts->c0->ts[1].lchan[0];
 
/* start testing with proper messages */
printf("Testing BTS<->MSC message scan.\n");

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

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


[PATCH] osmo-bsc[master]: remove libosmo-sccp dependency for osmo-bsc

2017-12-19 Thread Harald Welte

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

remove libosmo-sccp dependency for osmo-bsc

libosmo-sccp is the old sccp-lite-focused SCCP implementation that we
used before libosmo-sigtran was created.  The new osmo-bsc in this
repository is using libosmo-sigtran and shouldn't be using parts of
libosmo-sccp anymore.

We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat,
which is not even built in this repository anymore (or 'again yet'?)

Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d
---
M include/osmocom/bsc/osmo_bsc.h
M src/libfilter/Makefile.am
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_msc.c
M src/osmo-bsc/osmo_bsc_sigtran.c
M src/osmo-bsc/osmo_bsc_vty.c
M tests/bsc/Makefile.am
9 files changed, 6 insertions(+), 25 deletions(-)


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

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 8a5cd30..0fd29b7 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -15,7 +15,6 @@
BSC_CON_NO_MEM,
 };
 
-struct sccp_connection;
 struct bsc_msc_data;
 struct bsc_msc_connection;
 
@@ -47,10 +46,7 @@
int send_ping;
 
/* SCCP connection realted */
-   struct sccp_connection *sccp;
struct bsc_msc_data *msc;
-   struct osmo_timer_list sccp_it_timeout;
-   struct osmo_timer_list sccp_cc_timeout;
 
struct llist_head sccp_queue;
unsigned int sccp_queue_size;
diff --git a/src/libfilter/Makefile.am b/src/libfilter/Makefile.am
index 6d3db0b..41a75bd 100644
--- a/src/libfilter/Makefile.am
+++ b/src/libfilter/Makefile.am
@@ -10,7 +10,6 @@
$(LIBOSMOGSM_CFLAGS) \
$(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
-   $(LIBOSMOSCCP_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
 
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index 4acbe56..7978852 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -11,7 +11,6 @@
$(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOCTRL_CFLAGS) \
$(LIBOSMONETIF_CFLAGS) \
-   $(LIBOSMOSCCP_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
$(LIBOSMOSIGTRAN_CFLAGS) \
@@ -45,7 +44,6 @@
$(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libcommon-cs/libcommon-cs.a \
$(top_builddir)/src/libcommon/libcommon.a \
-   $(LIBOSMOSCCP_LIBS) \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOVTY_LIBS) \
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index c388f5b..152b818 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -29,7 +29,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 #define return_when_not_connected(conn) \
@@ -296,13 +295,11 @@
resp = gsm0808_create_layer3(msg, network_code, country_code, lac, ci);
if (!resp) {
LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n");
-   sccp_connection_free(conn->sccp_con->sccp);
osmo_bsc_sigtran_del_conn(conn->sccp_con);
return BSC_API_CONN_POL_REJECT;
}
 
if (osmo_bsc_sigtran_open_conn(conn->sccp_con, resp) != 0) {
-   sccp_connection_free(conn->sccp_con->sccp);
osmo_bsc_sigtran_del_conn(conn->sccp_con);
msgb_free(resp);
return BSC_API_CONN_POL_REJECT;
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 829f207..e4c8fc5 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -43,7 +43,6 @@
 
 #include 
 
-#include 
 #include 
 
 #define _GNU_SOURCE
@@ -233,9 +232,6 @@
 
/* seed the PRNG */
srand(time(NULL));
-
-   /* initialize SCCP */
-   sccp_set_log_area(DSCCP);
 
/* Read the config */
rc = bsc_network_configure(config_file);
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 0e5777e..46be2e6 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -34,8 +34,6 @@
 
 #include 
 
-#include 
-
 #include 
 
 #include 
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index a18d4f3..7669b67 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -511,7 +510,8 @@
 
/* If unset, use default local SCCP address */
if (!msc->a.bsc_addr.presence)
-   osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, 
msc->a.sccp, SCCP_SSN_BSSAP);
+   osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, 
msc->a.sccp,
+OSMO_SCCP_SSN_BSSAP);
 
if (!osmo_sccp_check_addr(&msc->a.bsc_addr, 
OSMO_SCCP_ADDR_T_SSN

[PATCH] osmo-bsc[master]: osmo_bsc_bssap.c: Spelling fixes in comment

2017-12-19 Thread Harald Welte

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

osmo_bsc_bssap.c: Spelling fixes in comment

Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 4fd43aa..aea3994 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -385,7 +385,7 @@
  * a cipher we will have to send cipher mode reject to the MSC,
  * otherwise we will have to pick something that we and the MS
  * is supporting. Currently we are doing it in a rather static
- * way by picking one ecnryption or no encrytpion.
+ * way by picking one encryption or no encryption.
  */
 static int bssmap_handle_cipher_mode(struct osmo_bsc_sccp_con *conn,
 struct msgb *msg, unsigned int 
payload_length)
@@ -613,7 +613,7 @@
   get_value_string(gsm48_chan_mode_names, chan_mode),
   ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, 
ct.perm_spch_len));
 
-   /* Forward the assingment request to lower layers */
+   /* Forward the assignment request to lower layers */
if (aoip) {
/* Store network side RTP connection information, we will
 * process this address later after we have established an RTP
@@ -626,7 +626,7 @@
/* Create an assignment request using the MGCP fsm. This FSM
 * is directly started when its created (now) and will also
 * take care about the further processing (creating RTP
-* endpoints, calling gsm0808_assign_req(), rsponding to
+* endpoints, calling gsm0808_assign_req(), responding to
 * the assignment request etc... */
conn->mgcp_ctx = mgcp_assignm_req(msc->network, 
msc->network->mgw.client, conn, chan_mode, full_rate);
if (!conn->mgcp_ctx) {

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

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


[PATCH] osmo-bsc[master]: cosmetic: Hide all accesses to conn->bts behind conn_get_bts()

2017-12-19 Thread Harald Welte

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

cosmetic: Hide all accesses to conn->bts behind conn_get_bts()

This is a new inline function that hides all accesses to conn->bts.

A follow-up patch will then point this to conn->lchan->ts->trx->bts
to get rid of the bts field.

Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_api.c
M src/libbsc/bsc_vty.c
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_audio.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_sigtran.c
8 files changed, 29 insertions(+), 22 deletions(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 3cc3794..45fbcd2 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -98,6 +98,10 @@
struct gsm_classmark classmark;
 };
 
+static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection 
*conn) {
+   return conn->bts;
+}
+
 
 #include "gsm_data_shared.h"
 
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 9ec51af..bd55dfc 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -214,7 +214,7 @@
 
chan_type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H;
 
-   new_lchan = lchan_alloc(conn->bts, chan_type, 0);
+   new_lchan = lchan_alloc(conn_get_bts(conn), chan_type, 0);
 
if (!new_lchan) {
LOGP(DMSC, LOGL_NOTICE, "No free channel.\n");
@@ -451,7 +451,7 @@
conn->lchan = conn->secondary_lchan;
conn->secondary_lchan = NULL;
 
-   if (is_ipaccess_bts(conn->bts) && conn->lchan->tch_mode != 
GSM48_CMODE_SIGN)
+   if (is_ipaccess_bts(conn_get_bts(conn)) && conn->lchan->tch_mode != 
GSM48_CMODE_SIGN)
rsl_ipacc_crcx(conn->lchan);
 
api->assign_compl(conn, gh->data[0],
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 7612eda..6d01109 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -1378,7 +1378,7 @@
 
/* Find the connection/lchan that we want to handover */
llist_for_each_entry(conn, &net->subscr_conns, entry) {
-   if (conn->bts->nr == bts_nr &&
+   if (conn_get_bts(conn)->nr == bts_nr &&
conn->lchan->ts->trx->nr == trx_nr &&
conn->lchan->ts->nr == ts_nr && conn->lchan->nr == ss_nr) {
vty_out(vty, "starting handover for lchan %s...%s",
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index a2a8630..1caaeee 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -115,7 +115,7 @@
req.black_list = NULL;
req.access_lists = bsc_access_lists();
req.local_lst_name = msc->acc_lst_name;
-   req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name;
+   req.global_lst_name = 
conn_get_bts(conn)->network->bsc_data->acc_lst_name;
req.bsc_nr = 0;
 
rc = bsc_msg_filter_initial(gh, msgb_l3len(msg), &req,
@@ -136,7 +136,7 @@
req.black_list = NULL;
req.access_lists = bsc_access_lists();
req.local_lst_name = conn->sccp_con->msc->acc_lst_name;
-   req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name;
+   req.global_lst_name = 
conn_get_bts(conn)->network->bsc_data->acc_lst_name;
req.bsc_nr = 0;
 
rc = bsc_msg_filter_data(gh, msgb_l3len(msg), &req,
@@ -228,7 +228,7 @@
if (!msc) {
LOGP(DMSC, LOGL_ERROR, "Failed to find a MSC for a 
connection.\n");
bsc_send_ussd_no_srv(conn, msg,
-
conn->bts->network->bsc_data->ussd_no_msc_txt);
+
conn_get_bts(conn)->network->bsc_data->ussd_no_msc_txt);
return -1;
}
 
@@ -287,8 +287,8 @@
 
network_code = get_network_code_for_msc(conn->sccp_con->msc);
country_code = get_country_code_for_msc(conn->sccp_con->msc);
-   lac = get_lac_for_msc(conn->sccp_con->msc, conn->bts);
-   ci = get_ci_for_msc(conn->sccp_con->msc, conn->bts);
+   lac = get_lac_for_msc(conn->sccp_con->msc, conn_get_bts(conn));
+   ci = get_ci_for_msc(conn->sccp_con->msc, conn_get_bts(conn));
 
bsc_scan_bts_msg(conn, msg);
 
@@ -383,7 +383,7 @@
/*
 * Check if the connection should be moved...
 */
-   llist_for_each_entry(msc, &conn->bts->network->bsc_data->mscs, entry) {
+   llist_for_each_entry(msc, &conn_get_bts(conn)->network->bsc_data->mscs, 
entry) {
if (msc->type != MSC_CON_TYPE_LOCAL)
continue;
if (!msc->local_pref)
@@ -435,7 +435,7 @@
struct msgb *resp;
return_when_not_connected(conn);
 
-   if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) {
+   if (is_ipaccess_bts(conn_get_bts(conn)) && 
conn->sccp_con->user

[PATCH] osmo-bsc[master]: remove unused 'lac' member of 'struct gsm_subscriber_connect...

2017-12-19 Thread Harald Welte

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

remove unused 'lac' member of 'struct gsm_subscriber_connection'

This field was used in write-pnly mode, i.e. set but never read.

Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_api.c
2 files changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 2e97055..3cc3794 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -96,8 +96,6 @@
 
/* buffer/cache for classmark of the ME of the subscriber */
struct gsm_classmark classmark;
-
-   uint16_t lac;
 };
 
 
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 6ff1688..9ec51af 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -261,7 +261,6 @@
conn->network = net;
conn->lchan = lchan;
conn->bts = lchan->ts->trx->bts;
-   conn->lac = conn->bts->location_area_code;
lchan->conn = conn;
llist_add_tail(&conn->entry, &net->subscr_conns);
return conn;

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

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


[PATCH] osmo-bsc[master]: more remove

2017-12-19 Thread Harald Welte

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

more remove

Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f
---
M include/osmocom/bsc/osmo_bsc.h
1 file changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 0fd29b7..13072c2 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -48,9 +48,6 @@
/* SCCP connection realted */
struct bsc_msc_data *msc;
 
-   struct llist_head sccp_queue;
-   unsigned int sccp_queue_size;
-
struct gsm_subscriber_connection *conn;
uint8_t new_subscriber;
 

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

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


[PATCH] osmo-bsc[master]: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'

2017-12-19 Thread Harald Welte

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

osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'

Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6
---
M include/osmocom/bsc/osmo_bsc.h
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 13072c2..131007b 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -19,8 +19,10 @@
 struct bsc_msc_connection;
 
 struct osmo_bsc_sccp_con {
+   /* list_head anchoring us to gsm_network.subscr_conns */
struct llist_head entry;
 
+   /* flag to prevent multiple simultaneous ciphering commands */
int ciphering_handled;
 
/* for audio handling */
@@ -48,9 +50,12 @@
/* SCCP connection realted */
struct bsc_msc_data *msc;
 
+   /* back-pointer to subscriber connection */
struct gsm_subscriber_connection *conn;
+   /* state related to welcome USSD */
uint8_t new_subscriber;
 
+   /* state related to osmo_bsc_filter.c */
struct bsc_filter_state filter_state;
 
/* Sigtran connection ID */

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

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


[PATCH] osmo-bsc[master]: remove obsolete gsm_subscriber_connection.bts member

2017-12-19 Thread Harald Welte

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

remove obsolete gsm_subscriber_connection.bts member

This member was merely a cache for conn->lchan->ts->trx->bts,
so let's avoid having to keep copies of the same data (which needs
to be kept up to date).

Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_api.c
M src/libbsc/handover_logic.c
3 files changed, 5 insertions(+), 10 deletions(-)


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

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 45fbcd2..05260c6 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -85,9 +85,6 @@
struct gsm_lchan *lchan;
/* the future/allocated but not yet used lchan during HANDOVER */
struct gsm_lchan *ho_lchan;
-   /* a short-hand pointer to the BTS currently serving the subscriber,
-* points to gsm_subscriber_connection.lchan->ts->trx->bts */
-   struct gsm_bts *bts;
 
/* timer for assignment handling */
struct osmo_timer_list T10;
@@ -98,13 +95,14 @@
struct gsm_classmark classmark;
 };
 
-static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection 
*conn) {
-   return conn->bts;
-}
-
 
 #include "gsm_data_shared.h"
 
+static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection 
*conn) {
+   OSMO_ASSERT(conn->lchan);
+   return conn->lchan->ts->trx->bts;
+}
+
 enum {
BTS_CTR_CHREQ_TOTAL,
BTS_CTR_CHREQ_NO_CHANNEL,
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index bd55dfc..e015a02 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -260,7 +260,6 @@
 
conn->network = net;
conn->lchan = lchan;
-   conn->bts = lchan->ts->trx->bts;
lchan->conn = conn;
llist_add_tail(&conn->entry, &net->subscr_conns);
return conn;
@@ -747,7 +746,6 @@
conn->lchan = NULL;
conn->secondary_lchan = NULL;
conn->ho_lchan = NULL;
-   conn->bts = NULL;
 
osmo_timer_del(&conn->T10);
 
diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c
index a30cd09..5ad1392 100644
--- a/src/libbsc/handover_logic.c
+++ b/src/libbsc/handover_logic.c
@@ -277,7 +277,6 @@
 
new_lchan->conn->ho_lchan = NULL;
new_lchan->conn->lchan = new_lchan;
-   new_lchan->conn->bts = new_lchan->ts->trx->bts;
ho->old_lchan->conn = NULL;
 
lchan_release(ho->old_lchan, 0, RSL_REL_LOCAL_END);

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

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


[PATCH] osmo-bsc[master]: osmo-bsc: Move user plane/voice related bits into sub-structure

2017-12-19 Thread Harald Welte

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

osmo-bsc: Move user plane/voice related bits into sub-structure

This clarifies which members of the struct are for what.

Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412
---
M include/osmocom/bsc/osmo_bsc.h
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_audio.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_mgcp.c
M src/osmo-bsc/osmo_bsc_sigtran.c
7 files changed, 43 insertions(+), 44 deletions(-)


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

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 131007b..485c836 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -26,23 +26,23 @@
int ciphering_handled;
 
/* for audio handling */
-   uint16_t cic;
-   uint32_t rtp_ip;
-   int rtp_port;
+   struct {
+   uint16_t cic;
+   uint32_t rtp_ip;
+   int rtp_port;
+   /* RTP address of the remote end (assigned by MSC through 
assignment request) */
+   struct sockaddr_storage aoip_rtp_addr_remote;
 
-   /* RTP address of the remote end (assigned by MSC through assignment
-* request) */
-   struct sockaddr_storage aoip_rtp_addr_remote;
+   /* Local RTP address (reported back to the MSC by us with the
+* assignment complete message) */
+   struct sockaddr_storage aoip_rtp_addr_local;
 
-   /* Local RTP address (reported back to the MSC by us with the
-* assignment complete message) */
-   struct sockaddr_storage aoip_rtp_addr_local;
-
-   /* storage to keep states of the MGCP connection handler, the
-* handler is created when an assignment request is received
-* and is terminated when the assignment complete message is
-* sent */
-   struct mgcp_ctx *mgcp_ctx;
+   /* storage to keep states of the MGCP connection handler, the
+   * handler is created when an assignment request is received
+   * and is terminated when the assignment complete message is
+   * sent */
+   struct mgcp_ctx *mgcp_ctx;
+   } user_plane;
 
/* for advanced ping/pong */
int send_ping;
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index 152b818..a2a8630 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -435,7 +435,7 @@
struct msgb *resp;
return_when_not_connected(conn);
 
-   if (is_ipaccess_bts(conn->bts) && conn->sccp_con->rtp_ip) {
+   if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) {
/* NOTE: In a network that makes use of an IPA base station
 * and AoIP, we have to wait until the BTS reports its RTP
 * IP/Port combination back to BSC via RSL. Unfortunately, the
diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c
index 0c11b85..82367f0 100644
--- a/src/osmo-bsc/osmo_bsc_audio.c
+++ b/src/osmo-bsc/osmo_bsc_audio.c
@@ -57,17 +57,17 @@
 
/* we can ask it to connect now */
LOGP(DMSC, LOGL_DEBUG, "Connecting BTS to port: %d conn: %d\n",
-con->sccp_con->rtp_port, lchan->abis_ip.conn_id);
+con->sccp_con->user_plane.rtp_port, 
lchan->abis_ip.conn_id);
 
/* If AoIP is in use, the rtp_ip, which has been communicated
 * via the A interface as connect_ip */
-   if(con->sccp_con->rtp_ip)
-   rtp_ip = con->sccp_con->rtp_ip;
+   if(con->sccp_con->user_plane.rtp_ip)
+   rtp_ip = con->sccp_con->user_plane.rtp_ip;
else
rtp_ip = ntohl(INADDR_ANY);
 
rc = rsl_ipacc_mdcx(lchan, rtp_ip,
-   con->sccp_con->rtp_port,
+   con->sccp_con->user_plane.rtp_port,
lchan->abis_ip.rtp_payload2);
if (rc < 0) {
LOGP(DMSC, LOGL_ERROR, "Failed to send MDCX: %d\n", rc);
@@ -84,13 +84,13 @@
 * inform the logic that controls the MGW about the new
 * connection info */
LOGP(DMSC, LOGL_INFO,"RTP connection handover 
initiated...\n");
-   mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan);
-   } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) {
+   mgcp_handover(con->sccp_con->user_plane.mgcp_ctx, 
con->ho_lchan);
+   } else if (is_ipaccess_bts(con->bts) && 
con->sccp_con->user_plane.rtp_ip) {
/* NOTE: This is only relevant on AoIP networks with
 * IPA based base stations. See also osmo_bsc_api.c,
 

[PATCH] osmo-sgsn[master]: Remove unneeded .py scripts

2017-12-19 Thread Max

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

Remove unneeded .py scripts

The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for
vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py
are not SGSN-specific: leftovers from repository split which are now
available in osmo-python-tests as well.

Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c
---
M configure.ac
D contrib/Makefile.am
D contrib/ipa.py
D contrib/soap.py
D contrib/twisted_ipa.py
M tests/ctrl_test_runner.py
M tests/vty_test_runner.py
7 files changed, 2 insertions(+), 862 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/12/5512/1

diff --git a/configure.ac b/configure.ac
index 8f279fd..2de31cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,5 +197,4 @@
 tests/v42bis/Makefile
 doc/Makefile
 doc/examples/Makefile
-contrib/Makefile
 Makefile)
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
deleted file mode 100644
index db6d0f5..000
--- a/contrib/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = ipa.py
diff --git a/contrib/ipa.py b/contrib/ipa.py
deleted file mode 100755
index 71cbf45..000
--- a/contrib/ipa.py
+++ /dev/null
@@ -1,278 +0,0 @@
-#!/usr/bin/python3
-# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
-"""
-/*
- * Copyright (C) 2016 sysmocom s.f.m.c. GmbH
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-"""
-
-import struct, random, sys
-
-class IPA(object):
-"""
-Stateless IPA protocol multiplexer: add/remove/parse (extended) header
-"""
-version = "0.0.5"
-TCP_PORT_OML = 3002
-TCP_PORT_RSL = 3003
-# OpenBSC extensions: OSMO, MGCP_OLD
-PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, 
MGCP_OLD=0xFC)
-# ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol
-EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6)
-# OpenBSC extension: SCCP_OLD
-MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, 
SCCP_OLD=0xFF)
-_IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, 
SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8)
-CTRL_GET = 'GET'
-CTRL_SET = 'SET'
-CTRL_REP = 'REPLY'
-CTRL_ERR = 'ERR'
-CTRL_TRAP = 'TRAP'
-
-def _l(self, d, p):
-"""
-Reverse dictionary lookup: return key for a given value
-"""
-if p is None:
-return 'UNKNOWN'
-return list(d.keys())[list(d.values()).index(p)]
-
-def _tag(self, t, v):
-"""
-Create TAG as TLV data
-"""
-return struct.pack(">HB", len(v) + 1, t) + v
-
-def proto(self, p):
-"""
-Lookup protocol name
-"""
-return self._l(self.PROTO, p)
-
-def ext(self, p):
-"""
-Lookup protocol extension name
-"""
-return self._l(self.EXT, p)
-
-def msgt(self, p):
-"""
-Lookup message type name
-"""
-return self._l(self.MSGT, p)
-
-def idtag(self, p):
-"""
-Lookup ID tag name
-"""
-return self._l(self._IDTAG, p)
-
-def ext_name(self, proto, exten):
-"""
-Return proper extension byte name depending on the protocol used
-"""
-if self.PROTO['CCM'] == proto:
-return self.msgt(exten)
-if self.PROTO['OSMO'] == proto:
-return self.ext(exten)
-return None
-
-def add_header(self, data, proto, ext=None):
-"""
-Add IPA header (with extension if necessary), data must be represented 
as bytes
-"""
-if ext is None:
-return struct.pack(">HB", len(data) + 1, proto) + data
-return struct.pack(">HBB", len(data) + 1, proto, ext) + data
-
-def del_header(self, data):
-"""
-Strip IPA protocol header correctly removing extension if present
-Returns data length, IPA protocol, extension (or None if not defined 
for a give protocol) and the data without header
-"""
-if not len(data):
-return None, None, None, None
-(dlen, proto) = struct.unpack('>HB', data[:3])
-if self.PROTO['OSMO'] == proto or self.PROTO['CCM'] == proto: # 
there's extension which we have to unpack

[PATCH] osmo-bsc[master]: osmo-bsc: Move user plane/voice related bits into sub-structure

2017-12-19 Thread Harald Welte

osmo-bsc: Move user plane/voice related bits into sub-structure

This clarifies which members of the struct are for what.

Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412
---
M include/osmocom/bsc/osmo_bsc.h
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_audio.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_mgcp.c
M src/osmo-bsc/osmo_bsc_sigtran.c
7 files changed, 43 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/06/5506/2

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 131007b..485c836 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -26,23 +26,23 @@
int ciphering_handled;
 
/* for audio handling */
-   uint16_t cic;
-   uint32_t rtp_ip;
-   int rtp_port;
+   struct {
+   uint16_t cic;
+   uint32_t rtp_ip;
+   int rtp_port;
+   /* RTP address of the remote end (assigned by MSC through 
assignment request) */
+   struct sockaddr_storage aoip_rtp_addr_remote;
 
-   /* RTP address of the remote end (assigned by MSC through assignment
-* request) */
-   struct sockaddr_storage aoip_rtp_addr_remote;
+   /* Local RTP address (reported back to the MSC by us with the
+* assignment complete message) */
+   struct sockaddr_storage aoip_rtp_addr_local;
 
-   /* Local RTP address (reported back to the MSC by us with the
-* assignment complete message) */
-   struct sockaddr_storage aoip_rtp_addr_local;
-
-   /* storage to keep states of the MGCP connection handler, the
-* handler is created when an assignment request is received
-* and is terminated when the assignment complete message is
-* sent */
-   struct mgcp_ctx *mgcp_ctx;
+   /* storage to keep states of the MGCP connection handler, the
+   * handler is created when an assignment request is received
+   * and is terminated when the assignment complete message is
+   * sent */
+   struct mgcp_ctx *mgcp_ctx;
+   } user_plane;
 
/* for advanced ping/pong */
int send_ping;
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index 152b818..a2a8630 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -435,7 +435,7 @@
struct msgb *resp;
return_when_not_connected(conn);
 
-   if (is_ipaccess_bts(conn->bts) && conn->sccp_con->rtp_ip) {
+   if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) {
/* NOTE: In a network that makes use of an IPA base station
 * and AoIP, we have to wait until the BTS reports its RTP
 * IP/Port combination back to BSC via RSL. Unfortunately, the
diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c
index 0c11b85..82367f0 100644
--- a/src/osmo-bsc/osmo_bsc_audio.c
+++ b/src/osmo-bsc/osmo_bsc_audio.c
@@ -57,17 +57,17 @@
 
/* we can ask it to connect now */
LOGP(DMSC, LOGL_DEBUG, "Connecting BTS to port: %d conn: %d\n",
-con->sccp_con->rtp_port, lchan->abis_ip.conn_id);
+con->sccp_con->user_plane.rtp_port, 
lchan->abis_ip.conn_id);
 
/* If AoIP is in use, the rtp_ip, which has been communicated
 * via the A interface as connect_ip */
-   if(con->sccp_con->rtp_ip)
-   rtp_ip = con->sccp_con->rtp_ip;
+   if(con->sccp_con->user_plane.rtp_ip)
+   rtp_ip = con->sccp_con->user_plane.rtp_ip;
else
rtp_ip = ntohl(INADDR_ANY);
 
rc = rsl_ipacc_mdcx(lchan, rtp_ip,
-   con->sccp_con->rtp_port,
+   con->sccp_con->user_plane.rtp_port,
lchan->abis_ip.rtp_payload2);
if (rc < 0) {
LOGP(DMSC, LOGL_ERROR, "Failed to send MDCX: %d\n", rc);
@@ -84,13 +84,13 @@
 * inform the logic that controls the MGW about the new
 * connection info */
LOGP(DMSC, LOGL_INFO,"RTP connection handover 
initiated...\n");
-   mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan);
-   } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) {
+   mgcp_handover(con->sccp_con->user_plane.mgcp_ctx, 
con->ho_lchan);
+   } else if (is_ipaccess_bts(con->bts) && 
con->sccp_con->user_plane.rtp_ip) {
/* NOTE: This is only relevant on AoIP networks with
 * IPA based base stations. See also osmo_bsc_api.c,
 * function bsc_assign_compl() */

[PATCH] osmo-bsc[master]: more remove

2017-12-19 Thread Harald Welte

more remove

Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f
---
M include/osmocom/bsc/osmo_bsc.h
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/04/5504/2

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 0fd29b7..13072c2 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -48,9 +48,6 @@
/* SCCP connection realted */
struct bsc_msc_data *msc;
 
-   struct llist_head sccp_queue;
-   unsigned int sccp_queue_size;
-
struct gsm_subscriber_connection *conn;
uint8_t new_subscriber;
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5505

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

osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'

Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6
---
M include/osmocom/bsc/osmo_bsc.h
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/05/5505/2

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 13072c2..131007b 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -19,8 +19,10 @@
 struct bsc_msc_connection;
 
 struct osmo_bsc_sccp_con {
+   /* list_head anchoring us to gsm_network.subscr_conns */
struct llist_head entry;
 
+   /* flag to prevent multiple simultaneous ciphering commands */
int ciphering_handled;
 
/* for audio handling */
@@ -48,9 +50,12 @@
/* SCCP connection realted */
struct bsc_msc_data *msc;
 
+   /* back-pointer to subscriber connection */
struct gsm_subscriber_connection *conn;
+   /* state related to welcome USSD */
uint8_t new_subscriber;
 
+   /* state related to osmo_bsc_filter.c */
struct bsc_filter_state filter_state;
 
/* Sigtran connection ID */

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: Remove dead code left over from NITB split

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5475

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

Remove dead code left over from NITB split

There still is a lot of dead code that we inherited from the NITB
days, let's remove more of it.

libtrau will be re-introduced as part of osmo-mgw later.

Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8
---
M configure.ac
M include/osmocom/bsc/Makefile.am
D include/osmocom/bsc/auth.h
M include/osmocom/bsc/bss.h
M include/osmocom/bsc/chan_alloc.h
M include/osmocom/bsc/common_bsc.h
M include/osmocom/bsc/common_cs.h
D include/osmocom/bsc/crc24.h
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
D include/osmocom/bsc/gsm_subscriber.h
M include/osmocom/bsc/ipaccess.h
D include/osmocom/bsc/mncc.h
D include/osmocom/bsc/mncc_int.h
D include/osmocom/bsc/msc_ifaces.h
D include/osmocom/bsc/rtp_proxy.h
M include/osmocom/bsc/signal.h
D include/osmocom/bsc/silent_call.h
D include/osmocom/bsc/smpp.h
D include/osmocom/bsc/sms_queue.h
D include/osmocom/bsc/transaction.h
D include/osmocom/bsc/trau_mux.h
D include/osmocom/bsc/trau_upqueue.h
M src/Makefile.am
M src/ipaccess/Makefile.am
M src/ipaccess/ipaccess-config.c
M src/libbsc/abis_rsl.c
M src/libbsc/bsc_api.c
M src/libbsc/bsc_init.c
M src/libbsc/chan_alloc.c
M src/libbsc/e1_config.c
M src/libbsc/gsm_04_08_utils.c
M src/libbsc/handover_logic.c
M src/libbsc/net_init.c
M src/libcommon-cs/common_cs.c
M src/libcommon-cs/common_cs_vty.c
M src/libcommon/Makefile.am
M src/libcommon/common_vty.c
D src/libcommon/gsm_subscriber_base.c
M src/libcommon/talloc_ctx.c
D src/libtrau/Makefile.am
D src/libtrau/rtp_proxy.c
D src/libtrau/trau_mux.c
D src/libtrau/trau_upqueue.c
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc_nat/Makefile.am
M src/osmo-bsc_nat/bsc_filter.c
M src/utils/Makefile.am
M src/utils/bs11_config.c
M tests/Makefile.am
M tests/abis/Makefile.am
M tests/bsc-nat-trie/Makefile.am
M tests/bsc-nat/Makefile.am
M tests/bsc/Makefile.am
M tests/bsc/bsc_test.c
M tests/bssap/Makefile.am
M tests/bssap/bssap_test.c
M tests/channel/channel_test.c
M tests/gsm0408/Makefile.am
M tests/gsm0408/gsm0408_test.c
M tests/nanobts_omlattr/Makefile.am
M tests/subscr/Makefile.am
M tests/testsuite.at
D tests/trau/Makefile.am
D tests/trau/trau_test.c
D tests/trau/trau_test.ok
68 files changed, 30 insertions(+), 2,489 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/5475/3

diff --git a/configure.ac b/configure.ac
index b7dd016..540d2cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,7 +145,6 @@
 include/osmocom/Makefile
 include/osmocom/bsc/Makefile
 src/Makefile
-src/libtrau/Makefile
 src/libbsc/Makefile
 src/libcommon/Makefile
 src/libfilter/Makefile
@@ -161,7 +160,6 @@
 tests/bsc-nat/Makefile
 tests/bsc-nat-trie/Makefile
 tests/abis/Makefile
-tests/trau/Makefile
 tests/subscr/Makefile
 tests/nanobts_omlattr/Makefile
 tests/bssap/Makefile
diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 9d2ee6e..1b86f9a 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -4,7 +4,6 @@
abis_om2000.h \
abis_rsl.h \
arfcn_range_encode.h \
-   auth.h \
bsc_msc.h \
bsc_msg_filter.h \
bsc_nat.h \
@@ -18,7 +17,6 @@
common.h \
common_bsc.h \
common_cs.h \
-   crc24.h \
ctrl.h \
debug.h \
e1_config.h \
@@ -26,16 +24,12 @@
gsm_04_80.h \
gsm_data.h \
gsm_data_shared.h \
-   gsm_subscriber.h \
handover.h \
handover_decision.h \
ipaccess.h \
meas_feed.h \
meas_rep.h \
misdn.h \
-   mncc.h \
-   mncc_int.h \
-   msc_ifaces.h \
nat_rewrite_trie.h \
network_listen.h \
openbscdefines.h \
@@ -52,15 +46,9 @@
rest_octets.h \
rrlp.h \
rs232.h \
-   rtp_proxy.h \
signal.h \
-   silent_call.h \
-   sms_queue.h \
socket.h \
system_information.h \
-   transaction.h \
-   trau_mux.h \
-   trau_upqueue.h \
ussd.h \
vty.h \
bsc_api.h \
diff --git a/include/osmocom/bsc/auth.h b/include/osmocom/bsc/auth.h
deleted file mode 100644
index b314bbf..000
--- a/include/osmocom/bsc/auth.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _AUTH_H
-#define _AUTH_H
-
-#include 
-
-struct gsm_auth_tuple;
-
-enum auth_action {
-   AUTH_ERROR  = -1,   /* Internal error */
-   AUTH_NOT_AVAIL  = 0,/* No auth tuple available */
-   AUTH_DO_AUTH_THEN_CIPH  = 1,/* Firsth authenticate, then cipher */
-   AUTH_DO_CIPH= 2,/* Only ciphering */
-   AUTH_DO_AUTH= 3,/* Only authentication, no ciphering */
-};
-
-extern const struct value_string auth_action_n

[PATCH] osmo-bsc[master]: gsm_data.h: Document all fields of gsm_subscriber_connection

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5507

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

gsm_data.h: Document all fields of gsm_subscriber_connection

Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0
---
M include/osmocom/bsc/gsm_data.h
1 file changed, 14 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/07/5507/2

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 1cedef0..2e97055 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -75,20 +75,26 @@
/* libbsc subscriber information (if available) */
struct bsc_subscr *bsub;
 
-   /* bsc structures */
-   struct osmo_bsc_sccp_con *sccp_con; /* BSC */
+   /* SCCP connection associatd with this subscriber_connection */
+   struct osmo_bsc_sccp_con *sccp_con;
 
/* back pointers */
struct gsm_network *network;
 
-   struct gsm_lchan *lchan; /* BSC */
-   struct gsm_lchan *ho_lchan; /* BSC */
-   struct gsm_bts *bts; /* BSC */
+   /* the primary / currently active lchan to the BTS/subscriber */
+   struct gsm_lchan *lchan;
+   /* the future/allocated but not yet used lchan during HANDOVER */
+   struct gsm_lchan *ho_lchan;
+   /* a short-hand pointer to the BTS currently serving the subscriber,
+* points to gsm_subscriber_connection.lchan->ts->trx->bts */
+   struct gsm_bts *bts;
 
-   /* for assignment handling */
-   struct osmo_timer_list T10; /* BSC */
-   struct gsm_lchan *secondary_lchan; /* BSC */
+   /* timer for assignment handling */
+   struct osmo_timer_list T10;
+   /* the future allocated but not yet used lchan during ASSIGNMENT */
+   struct gsm_lchan *secondary_lchan;
 
+   /* buffer/cache for classmark of the ME of the subscriber */
struct gsm_classmark classmark;
 
uint16_t lac;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: Remove unused RRLP options/codec

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5476

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

Remove unused RRLP options/codec

RRLP is handled in OsmoMSC after the split from NITB, so let's remove
any bogus VTY commands left over in the BSC.

Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38
---
M doc/examples/osmo-bsc/osmo-bsc.cfg
M include/osmocom/bsc/Makefile.am
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
D include/osmocom/bsc/rrlp.h
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs_vty.c
M src/libcommon/gsm_data.c
8 files changed, 0 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/5476/3

diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index 64c3abd..6ad5e59 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -12,7 +12,6 @@
  encryption a5 0
  neci 0
  paging any use tch 0
- rrlp mode none
  mm info 0
  handover 0
  handover window rxlev averaging 10
diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 1b86f9a..b067fc2 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -44,7 +44,6 @@
pcu_if.h \
pcuif_proto.h \
rest_octets.h \
-   rrlp.h \
rs232.h \
signal.h \
socket.h \
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 3268426..0f8bcb9 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -332,11 +332,6 @@
/* timer to expire old location updates */
struct osmo_timer_list subscr_expire_timer;
 
-   /* Radio Resource Location Protocol (TS 04.31) */
-   struct {
-   enum rrlp_mode mode;
-   } rrlp;
-
enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T];
 
/* Use a TCH for handling requests of type paging any */
@@ -519,9 +514,6 @@
 
 enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
 const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
-
-enum rrlp_mode rrlp_mode_parse(const char *arg);
-const char *rrlp_mode_name(enum rrlp_mode mode);
 
 enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid);
 const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
diff --git a/include/osmocom/bsc/gsm_data_shared.h 
b/include/osmocom/bsc/gsm_data_shared.h
index 9bbcabd..5d9b570 100644
--- a/include/osmocom/bsc/gsm_data_shared.h
+++ b/include/osmocom/bsc/gsm_data_shared.h
@@ -34,14 +34,6 @@
 
 struct osmo_bsc_sccp_con;
 
-/* RRLP mode of operation */
-enum rrlp_mode {
-   RRLP_MODE_NONE,
-   RRLP_MODE_MS_BASED,
-   RRLP_MODE_MS_PREF,
-   RRLP_MODE_ASS_PREF,
-};
-
 /* Channel Request reason */
 enum gsm_chreq_reason_t {
GSM_CHREQ_REASON_EMERG,
diff --git a/include/osmocom/bsc/rrlp.h b/include/osmocom/bsc/rrlp.h
deleted file mode 100644
index c89402a..000
--- a/include/osmocom/bsc/rrlp.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _RRLP_H
-#define _RRLP_H
-
-void on_dso_load_rrlp(void);
-
-#endif /* _RRLP_H */
-
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 9500645..6fa8e04 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -180,8 +180,6 @@
VTY_NEWLINE);
vty_out(vty, "  Use TCH for Paging any: %d%s", net->pag_any_tch,
VTY_NEWLINE);
-   vty_out(vty, "  RRLP Mode: %s%s", rrlp_mode_name(net->rrlp.mode),
-   VTY_NEWLINE);
vty_out(vty, "  MM Info: %s%s", net->send_mm_info ? "On" : "Off",
VTY_NEWLINE);
vty_out(vty, "  Handover: %s%s", net->handover.active ? "On" : "Off",
@@ -817,8 +815,6 @@
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, 
VTY_NEWLINE);
-   vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode),
-   VTY_NEWLINE);
vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE);
vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE);
vty_out(vty, " handover window rxlev averaging %u%s",
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index beb936b..8f6e4ef 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -133,22 +133,6 @@
return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_rrlp_mode, cfg_net_rrlp_mode_cmd,
-  "rrlp mode (none|ms-based|ms-preferred|ass-preferred)",
-   "Radio Resource Location Protocol\n"
-   "Set the Radio Resource Location Protocol Mode\n"
-   "Don't send RRLP request\n"
-   "Request MS-based location\n"
-   "Request any location, prefer MS-based\n"
-   "Request any location, prefer MS-assisted\n")
-{
-   struct gsm_network *gsmnet = gsmnet_from_vty(vty);
-
-  

[PATCH] osmo-bsc[master]: remove unused 'lac' member of 'struct gsm_subscriber_connect...

2017-12-19 Thread Harald Welte

remove unused 'lac' member of 'struct gsm_subscriber_connection'

This field was used in write-pnly mode, i.e. set but never read.

Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_api.c
2 files changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/08/5508/2

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 2e97055..3cc3794 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -96,8 +96,6 @@
 
/* buffer/cache for classmark of the ME of the subscriber */
struct gsm_classmark classmark;
-
-   uint16_t lac;
 };
 
 
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 6ff1688..9ec51af 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -261,7 +261,6 @@
conn->network = net;
conn->lchan = lchan;
conn->bts = lchan->ts->trx->bts;
-   conn->lac = conn->bts->location_area_code;
lchan->conn = conn;
llist_add_tail(&conn->entry, &net->subscr_conns);
return conn;

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: Remove bogus vty config for LU reject cause

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5477

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

Remove bogus vty config for LU reject cause

The LU reject cause (like anything MM related) is under control of
OsmoMSC, not BSC.

Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_vty.c
M src/libbsc/net_init.c
M src/libcommon-cs/common_cs_vty.c
4 files changed, 0 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/5477/3

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 0f8bcb9..8e4dc04 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -280,7 +280,6 @@
uint16_t network_code;
char *name_long;
char *name_short;
-   enum gsm48_reject_value reject_cause;
int a5_encryption;
int neci;
int send_mm_info;
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 6fa8e04..a73c6a4 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -172,8 +172,6 @@
vty_out(vty, "  Short network name: '%s'%s",
net->name_short, VTY_NEWLINE);
vty_out(vty, "%s", VTY_NEWLINE);
-   vty_out(vty, "  Location updating reject cause: %u%s",
-   net->reject_cause, VTY_NEWLINE);
vty_out(vty, "  Encryption: A5/%u%s", net->a5_encryption,
VTY_NEWLINE);
vty_out(vty, "  NECI (TCH/H): %u%s", net->neci,
@@ -810,8 +808,6 @@
vty_out(vty, " mobile network code %u%s", gsmnet->network_code, 
VTY_NEWLINE);
vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE);
vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE);
-   vty_out(vty, " location updating reject cause %u%s",
-   gsmnet->reject_cause, VTY_NEWLINE);
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, 
VTY_NEWLINE);
diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c
index 59a8d5c..30de0cc 100644
--- a/src/libbsc/net_init.c
+++ b/src/libbsc/net_init.c
@@ -42,7 +42,6 @@
INIT_LLIST_HEAD(&net->bsc_data->mscs);
 
net->num_bts = 0;
-   net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED;
net->T3101 = GSM_T3101_DEFAULT;
net->T3103 = GSM_T3103_DEFAULT;
net->T3105 = GSM_T3105_DEFAULT;
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index 8f6e4ef..2732ebf 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -102,22 +102,6 @@
return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_reject_cause,
-  cfg_net_reject_cause_cmd,
-  "location updating reject cause <2-111>",
-  "Set the reject cause of location updating reject\n"
-  "Set the reject cause of location updating reject\n"
-  "Set the reject cause of location updating reject\n"
-  "Set the reject cause of location updating reject\n"
-  "Cause Value as Per GSM TS 04.08\n")
-{
-   struct gsm_network *gsmnet = gsmnet_from_vty(vty);
-
-   gsmnet->reject_cause = atoi(argv[0]);
-
-   return CMD_SUCCESS;
-}
-
 DEFUN(cfg_net_encryption,
   cfg_net_encryption_cmd,
   "encryption a5 (0|1|2|3)",
@@ -264,7 +248,6 @@
install_element(GSMNET_NODE, &cfg_net_mnc_cmd);
install_element(GSMNET_NODE, &cfg_net_name_short_cmd);
install_element(GSMNET_NODE, &cfg_net_name_long_cmd);
-   install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd);
install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
install_element(GSMNET_NODE, &cfg_net_mm_info_cmd);
install_element(GSMNET_NODE, &cfg_net_timezone_cmd);

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

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


[PATCH] osmo-bsc[master]: Remove bogus MM INFO configuration

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5478

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

Remove bogus MM INFO configuration

The network name and other MM INFO is controlled by the MSC, not the BSC.

Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_ctrl_commands.c
M src/libbsc/bsc_init.c
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs_vty.c
5 files changed, 0 insertions(+), 91 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/5478/3

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 8e4dc04..7a1b62d 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -278,8 +278,6 @@
/* global parameters */
uint16_t country_code;
uint16_t network_code;
-   char *name_long;
-   char *name_short;
int a5_encryption;
int neci;
int send_mm_info;
diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c
index 2d6fcb6..41d2361 100644
--- a/src/libbsc/bsc_ctrl_commands.c
+++ b/src/libbsc/bsc_ctrl_commands.c
@@ -30,45 +30,8 @@
 #include 
 #include 
 
-#define CTRL_CMD_VTY_STRING(cmdname, cmdstr, dtype, element) \
-   CTRL_HELPER_GET_STRING(cmdname, dtype, element) \
-   CTRL_HELPER_SET_STRING(cmdname, dtype, element) \
-static struct ctrl_cmd_element cmd_##cmdname = { \
-   .name = cmdstr, \
-   .get = get_##cmdname, \
-   .set = set_##cmdname, \
-   .verify = verify_vty_description_string, \
-}
-
-/**
- * Check that there are no newlines or comments or other things
- * that could make the VTY configuration unparsable.
- */
-static int verify_vty_description_string(struct ctrl_cmd *cmd,
-   const char *value, void *data)
-{
-   int i;
-   const size_t len = strlen(value);
-
-   for (i = 0; i < len; ++i) {
-   switch(value[i]) {
-   case '#':
-   case '\n':
-   case '\r':
-   cmd->reply = "String includes illegal character";
-   return -1;
-   default:
-   break;
-   }
-   }
-
-   return 0;
-}
-
 CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 
999);
 CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 
999);
-CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, 
name_short);
-CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long);
 
 static int set_net_apply_config(struct ctrl_cmd *cmd, void *data)
 {
@@ -452,8 +415,6 @@
int rc = 0;
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc);
-   rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_short_name);
-   rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_long_name);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock);
diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index 34dfd36..c5a75aa 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -536,9 +536,6 @@
if (!bsc_gsmnet)
return -ENOMEM;
 
-   bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC");
-   bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC");
-
return 0;
 }
 
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index a73c6a4..7612eda 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -167,18 +167,12 @@
vty_out(vty, "BSC is on Country Code %u, Network Code %u "
"and has %u BTS%s", net->country_code, net->network_code,
net->num_bts, VTY_NEWLINE);
-   vty_out(vty, "  Long network name: '%s'%s",
-   net->name_long, VTY_NEWLINE);
-   vty_out(vty, "  Short network name: '%s'%s",
-   net->name_short, VTY_NEWLINE);
vty_out(vty, "%s", VTY_NEWLINE);
vty_out(vty, "  Encryption: A5/%u%s", net->a5_encryption,
VTY_NEWLINE);
vty_out(vty, "  NECI (TCH/H): %u%s", net->neci,
VTY_NEWLINE);
vty_out(vty, "  Use TCH for Paging any: %d%s", net->pag_any_tch,
-   VTY_NEWLINE);
-   vty_out(vty, "  MM Info: %s%s", net->send_mm_info ? "On" : "Off",
VTY_NEWLINE);
vty_out(vty, "  Handover: %s%s", net->handover.active ? "On" : "Off",
VTY_NEWLINE);
@@ -806,12 +800,9 @@
vty_out(vty, "network%s", VTY_NEWLINE);
vty_out(vty, " network country code %u%s", gsmnet->country_code, 
VTY_NEWLINE);
vty_out(vty, " mobile network code %u%s", gsmnet->network_code, 
VTY_NEWLINE);
-   vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE);
-  

[PATCH] osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures

2017-12-19 Thread Harald Welte

bsc_test.c: Use proper network/bts/lchan structures

don't mock them, simply call the respective functions to get
a gsm_network and a gsm_bts with all its subordinate members.

Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
---
M tests/bsc/bsc_test.c
1 file changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/5509/2

diff --git a/tests/bsc/bsc_test.c b/tests/bsc/bsc_test.c
index 1d7baa1..420ef73 100644
--- a/tests/bsc/bsc_test.c
+++ b/tests/bsc/bsc_test.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -121,22 +122,20 @@
 {
int i;
 
-   struct gsm_network *net;
-   struct gsm_bts *bts;
+   struct gsm_network *net = bsc_network_init(NULL, 1, 1);
+   struct gsm_bts *bts = gsm_bts_alloc(net, 0);
struct osmo_bsc_sccp_con *sccp_con;
struct bsc_msc_data *msc;
struct gsm_subscriber_connection *conn;
 
-   net = talloc_zero(NULL, struct gsm_network);
-   bts = talloc_zero(net, struct gsm_bts);
sccp_con = talloc_zero(net, struct osmo_bsc_sccp_con);
msc = talloc_zero(net, struct bsc_msc_data);
conn = talloc_zero(net, struct gsm_subscriber_connection);
 
bts->network = net;
sccp_con->msc = msc;
-   conn->bts = bts;
conn->sccp_con = sccp_con;
+   conn->lchan = &bts->c0->ts[1].lchan[0];
 
/* start testing with proper messages */
printf("Testing BTS<->MSC message scan.\n");

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8bdf009d3c7e2473dd42da02762039a19430d6ce
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: osmo_bsc_bssap.c: Spelling fixes in comment

2017-12-19 Thread Harald Welte

osmo_bsc_bssap.c: Spelling fixes in comment

Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/03/5503/2

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 4fd43aa..aea3994 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -385,7 +385,7 @@
  * a cipher we will have to send cipher mode reject to the MSC,
  * otherwise we will have to pick something that we and the MS
  * is supporting. Currently we are doing it in a rather static
- * way by picking one ecnryption or no encrytpion.
+ * way by picking one encryption or no encryption.
  */
 static int bssmap_handle_cipher_mode(struct osmo_bsc_sccp_con *conn,
 struct msgb *msg, unsigned int 
payload_length)
@@ -613,7 +613,7 @@
   get_value_string(gsm48_chan_mode_names, chan_mode),
   ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, 
ct.perm_spch_len));
 
-   /* Forward the assingment request to lower layers */
+   /* Forward the assignment request to lower layers */
if (aoip) {
/* Store network side RTP connection information, we will
 * process this address later after we have established an RTP
@@ -626,7 +626,7 @@
/* Create an assignment request using the MGCP fsm. This FSM
 * is directly started when its created (now) and will also
 * take care about the further processing (creating RTP
-* endpoints, calling gsm0808_assign_req(), rsponding to
+* endpoints, calling gsm0808_assign_req(), responding to
 * the assignment request etc... */
conn->mgcp_ctx = mgcp_assignm_req(msc->network, 
msc->network->mgw.client, conn, chan_mode, full_rate);
if (!conn->mgcp_ctx) {

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: Remove some more dead code

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5479

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

Remove some more dead code

Change-Id: I919bffe88babd90227c89abd4434322965c32ebb
---
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
M src/libcommon-cs/common_cs.c
M src/libcommon/gsm_data.c
4 files changed, 0 insertions(+), 163 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/79/5479/3

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 7a1b62d..1cedef0 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -24,9 +24,7 @@
 
 #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3]
 
-struct gsm_subscriber_group;
 struct bsc_subscr;
-struct vlr_instance;
 struct gprs_ra_id;
 
 #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3]
@@ -40,26 +38,11 @@
 #define EARFCN_QRXLV_INVALID 32
 #define EARFCN_THRESH_LOW_INVALID 32
 
-enum gsm_security_event {
-   GSM_SECURITY_NOAVAIL,
-   GSM_SECURITY_AUTH_FAILED,
-   GSM_SECURITY_SUCCEEDED,
-   GSM_SECURITY_ALREADY,
-};
-
 struct msgb;
 typedef int gsm_cbfn(unsigned int hooknum,
 unsigned int event,
 struct msgb *msg,
 void *data, void *param);
-
-/*
- * A dummy to keep a connection up for at least
- * a couple of seconds to work around MSC issues.
- */
-struct gsm_anchor_operation {
-   struct osmo_timer_list timeout;
-};
 
 /* Maximum number of neighbor cells whose average we track */
 #define MAX_NEIGH_MEAS 10
@@ -75,16 +58,6 @@
uint8_t last_seen_nr;
 };
 
-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;
@@ -92,12 +65,6 @@
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,
 };
 
 /* active radio connection of a mobile subscriber */
@@ -125,29 +92,6 @@
struct gsm_classmark classmark;
 
uint16_t lac;
-   struct gsm_encr encr;
-
-   struct {
-   unsigned int mgcp_rtp_endpoint;
-   uint16_t port_subscr;
-   uint16_t port_cn;
-   } rtp;
-
-   struct {
-   /* A pointer to the SCCP user that handles
-* the SCCP connections for this subscriber
-* connection */
-   struct osmo_sccp_user *scu;
-
-   /* The address of the BSC that is associated
-* with this subscriber connection */
-   struct osmo_sccp_addr bsc_addr;
-
-   /* The connection identifier that is used
-* to reference the SCCP connection that is
-* associated with this subscriber connection */
-   int conn_id;
-   } a;
 };
 
 
@@ -241,13 +185,6 @@
bsc_ctr_description,
 };
 
-enum gsm_auth_policy {
-   GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */
-   GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized 
in DB */
-   GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke 
authorization */
-   GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */
-};
-
 #define GSM_T3101_DEFAULT 3/* s */
 #define GSM_T3103_DEFAULT 5/* s */
 #define GSM_T3105_DEFAULT 100  /* ms */
@@ -280,7 +217,6 @@
uint16_t network_code;
int a5_encryption;
int neci;
-   int send_mm_info;
struct {
int active;
/* Window RXLEV averaging */
@@ -299,7 +235,6 @@
} handover;
 
struct rate_ctr_group *bsc_ctrs;
-   struct osmo_counter *active_calls;
 
/*
 * TODO: Move the trans_list into the subscriber connection and
@@ -361,12 +296,6 @@
 * pointer is NULL to indicate absence of a bsc_subscribers list. */
struct llist_head *bsc_subscribers;
 
-   /* MSC: GSUP server address of the HLR */
-   const char *gsup_server_addr_str;
-   uint16_t gsup_server_port;
-
-   struct vlr_instance *vlr;
-
/* Periodic location update default value */
uint8_t t3212;
 
@@ -374,65 +303,6 @@
struct mgcp_client_conf *conf;
struct mgcp_client *client;
} mgw;
-
-   struct {
-   /* CS7 instance id number (set via VTY) */
-   uint32_t cs7_instance;
-   /* A list w

[PATCH] osmo-bsc[master]: cosmetic: Hide all accesses to conn->bts behind conn_get_bts()

2017-12-19 Thread Harald Welte

cosmetic: Hide all accesses to conn->bts behind conn_get_bts()

This is a new inline function that hides all accesses to conn->bts.

A follow-up patch will then point this to conn->lchan->ts->trx->bts
to get rid of the bts field.

Change-Id: Ib6cf7097ced34eebe80441c29ab1534f21956a33
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_api.c
M src/libbsc/bsc_vty.c
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_audio.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_sigtran.c
8 files changed, 29 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/10/5510/2

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 3cc3794..45fbcd2 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -98,6 +98,10 @@
struct gsm_classmark classmark;
 };
 
+static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection 
*conn) {
+   return conn->bts;
+}
+
 
 #include "gsm_data_shared.h"
 
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 9ec51af..bd55dfc 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -214,7 +214,7 @@
 
chan_type = full_rate ? GSM_LCHAN_TCH_F : GSM_LCHAN_TCH_H;
 
-   new_lchan = lchan_alloc(conn->bts, chan_type, 0);
+   new_lchan = lchan_alloc(conn_get_bts(conn), chan_type, 0);
 
if (!new_lchan) {
LOGP(DMSC, LOGL_NOTICE, "No free channel.\n");
@@ -451,7 +451,7 @@
conn->lchan = conn->secondary_lchan;
conn->secondary_lchan = NULL;
 
-   if (is_ipaccess_bts(conn->bts) && conn->lchan->tch_mode != 
GSM48_CMODE_SIGN)
+   if (is_ipaccess_bts(conn_get_bts(conn)) && conn->lchan->tch_mode != 
GSM48_CMODE_SIGN)
rsl_ipacc_crcx(conn->lchan);
 
api->assign_compl(conn, gh->data[0],
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 7612eda..6d01109 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -1378,7 +1378,7 @@
 
/* Find the connection/lchan that we want to handover */
llist_for_each_entry(conn, &net->subscr_conns, entry) {
-   if (conn->bts->nr == bts_nr &&
+   if (conn_get_bts(conn)->nr == bts_nr &&
conn->lchan->ts->trx->nr == trx_nr &&
conn->lchan->ts->nr == ts_nr && conn->lchan->nr == ss_nr) {
vty_out(vty, "starting handover for lchan %s...%s",
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index a2a8630..1caaeee 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -115,7 +115,7 @@
req.black_list = NULL;
req.access_lists = bsc_access_lists();
req.local_lst_name = msc->acc_lst_name;
-   req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name;
+   req.global_lst_name = 
conn_get_bts(conn)->network->bsc_data->acc_lst_name;
req.bsc_nr = 0;
 
rc = bsc_msg_filter_initial(gh, msgb_l3len(msg), &req,
@@ -136,7 +136,7 @@
req.black_list = NULL;
req.access_lists = bsc_access_lists();
req.local_lst_name = conn->sccp_con->msc->acc_lst_name;
-   req.global_lst_name = conn->bts->network->bsc_data->acc_lst_name;
+   req.global_lst_name = 
conn_get_bts(conn)->network->bsc_data->acc_lst_name;
req.bsc_nr = 0;
 
rc = bsc_msg_filter_data(gh, msgb_l3len(msg), &req,
@@ -228,7 +228,7 @@
if (!msc) {
LOGP(DMSC, LOGL_ERROR, "Failed to find a MSC for a 
connection.\n");
bsc_send_ussd_no_srv(conn, msg,
-
conn->bts->network->bsc_data->ussd_no_msc_txt);
+
conn_get_bts(conn)->network->bsc_data->ussd_no_msc_txt);
return -1;
}
 
@@ -287,8 +287,8 @@
 
network_code = get_network_code_for_msc(conn->sccp_con->msc);
country_code = get_country_code_for_msc(conn->sccp_con->msc);
-   lac = get_lac_for_msc(conn->sccp_con->msc, conn->bts);
-   ci = get_ci_for_msc(conn->sccp_con->msc, conn->bts);
+   lac = get_lac_for_msc(conn->sccp_con->msc, conn_get_bts(conn));
+   ci = get_ci_for_msc(conn->sccp_con->msc, conn_get_bts(conn));
 
bsc_scan_bts_msg(conn, msg);
 
@@ -383,7 +383,7 @@
/*
 * Check if the connection should be moved...
 */
-   llist_for_each_entry(msc, &conn->bts->network->bsc_data->mscs, entry) {
+   llist_for_each_entry(msc, &conn_get_bts(conn)->network->bsc_data->mscs, 
entry) {
if (msc->type != MSC_CON_TYPE_LOCAL)
continue;
if (!msc->local_pref)
@@ -435,7 +435,7 @@
struct msgb *resp;
return_when_not_connected(conn);
 
-   if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) {
+   if (is_ipaccess_bts(conn_get_bts(conn)) && 
conn->sccp_con->user_plane.rtp_ip) {
/* NOTE: In

[PATCH] osmo-bsc[master]: remove obsolete gsm_subscriber_connection.bts member

2017-12-19 Thread Harald Welte

remove obsolete gsm_subscriber_connection.bts member

This member was merely a cache for conn->lchan->ts->trx->bts,
so let's avoid having to keep copies of the same data (which needs
to be kept up to date).

Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_api.c
M src/libbsc/handover_logic.c
3 files changed, 5 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/11/5511/2

diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 45fbcd2..05260c6 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -85,9 +85,6 @@
struct gsm_lchan *lchan;
/* the future/allocated but not yet used lchan during HANDOVER */
struct gsm_lchan *ho_lchan;
-   /* a short-hand pointer to the BTS currently serving the subscriber,
-* points to gsm_subscriber_connection.lchan->ts->trx->bts */
-   struct gsm_bts *bts;
 
/* timer for assignment handling */
struct osmo_timer_list T10;
@@ -98,13 +95,14 @@
struct gsm_classmark classmark;
 };
 
-static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection 
*conn) {
-   return conn->bts;
-}
-
 
 #include "gsm_data_shared.h"
 
+static inline struct gsm_bts *conn_get_bts(struct gsm_subscriber_connection 
*conn) {
+   OSMO_ASSERT(conn->lchan);
+   return conn->lchan->ts->trx->bts;
+}
+
 enum {
BTS_CTR_CHREQ_TOTAL,
BTS_CTR_CHREQ_NO_CHANNEL,
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index bd55dfc..e015a02 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -260,7 +260,6 @@
 
conn->network = net;
conn->lchan = lchan;
-   conn->bts = lchan->ts->trx->bts;
lchan->conn = conn;
llist_add_tail(&conn->entry, &net->subscr_conns);
return conn;
@@ -747,7 +746,6 @@
conn->lchan = NULL;
conn->secondary_lchan = NULL;
conn->ho_lchan = NULL;
-   conn->bts = NULL;
 
osmo_timer_del(&conn->T10);
 
diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c
index a30cd09..5ad1392 100644
--- a/src/libbsc/handover_logic.c
+++ b/src/libbsc/handover_logic.c
@@ -277,7 +277,6 @@
 
new_lchan->conn->ho_lchan = NULL;
new_lchan->conn->lchan = new_lchan;
-   new_lchan->conn->bts = new_lchan->ts->trx->bts;
ho->old_lchan->conn = NULL;
 
lchan_release(ho->old_lchan, 0, RSL_REL_LOCAL_END);

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id3bff8b18425ef5d45eb460ac9eb620023013ba0
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[PATCH] osmo-bsc[master]: remove libosmo-sccp dependency for osmo-bsc

2017-12-19 Thread Harald Welte

remove libosmo-sccp dependency for osmo-bsc

libosmo-sccp is the old sccp-lite-focused SCCP implementation that we
used before libosmo-sigtran was created.  The new osmo-bsc in this
repository is using libosmo-sigtran and shouldn't be using parts of
libosmo-sccp anymore.

We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat,
which is not even built in this repository anymore (or 'again yet'?)

Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d
---
M include/osmocom/bsc/osmo_bsc.h
M src/libfilter/Makefile.am
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_msc.c
M src/osmo-bsc/osmo_bsc_sigtran.c
M src/osmo-bsc/osmo_bsc_vty.c
M tests/bsc/Makefile.am
9 files changed, 6 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/02/5502/2

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 8a5cd30..0fd29b7 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -15,7 +15,6 @@
BSC_CON_NO_MEM,
 };
 
-struct sccp_connection;
 struct bsc_msc_data;
 struct bsc_msc_connection;
 
@@ -47,10 +46,7 @@
int send_ping;
 
/* SCCP connection realted */
-   struct sccp_connection *sccp;
struct bsc_msc_data *msc;
-   struct osmo_timer_list sccp_it_timeout;
-   struct osmo_timer_list sccp_cc_timeout;
 
struct llist_head sccp_queue;
unsigned int sccp_queue_size;
diff --git a/src/libfilter/Makefile.am b/src/libfilter/Makefile.am
index 6d3db0b..41a75bd 100644
--- a/src/libfilter/Makefile.am
+++ b/src/libfilter/Makefile.am
@@ -10,7 +10,6 @@
$(LIBOSMOGSM_CFLAGS) \
$(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
-   $(LIBOSMOSCCP_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
 
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index 4acbe56..7978852 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -11,7 +11,6 @@
$(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOCTRL_CFLAGS) \
$(LIBOSMONETIF_CFLAGS) \
-   $(LIBOSMOSCCP_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
$(LIBOSMOSIGTRAN_CFLAGS) \
@@ -45,7 +44,6 @@
$(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libcommon-cs/libcommon-cs.a \
$(top_builddir)/src/libcommon/libcommon.a \
-   $(LIBOSMOSCCP_LIBS) \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOVTY_LIBS) \
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index c388f5b..152b818 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -29,7 +29,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 #define return_when_not_connected(conn) \
@@ -296,13 +295,11 @@
resp = gsm0808_create_layer3(msg, network_code, country_code, lac, ci);
if (!resp) {
LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n");
-   sccp_connection_free(conn->sccp_con->sccp);
osmo_bsc_sigtran_del_conn(conn->sccp_con);
return BSC_API_CONN_POL_REJECT;
}
 
if (osmo_bsc_sigtran_open_conn(conn->sccp_con, resp) != 0) {
-   sccp_connection_free(conn->sccp_con->sccp);
osmo_bsc_sigtran_del_conn(conn->sccp_con);
msgb_free(resp);
return BSC_API_CONN_POL_REJECT;
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 829f207..e4c8fc5 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -43,7 +43,6 @@
 
 #include 
 
-#include 
 #include 
 
 #define _GNU_SOURCE
@@ -233,9 +232,6 @@
 
/* seed the PRNG */
srand(time(NULL));
-
-   /* initialize SCCP */
-   sccp_set_log_area(DSCCP);
 
/* Read the config */
rc = bsc_network_configure(config_file);
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 0e5777e..46be2e6 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -34,8 +34,6 @@
 
 #include 
 
-#include 
-
 #include 
 
 #include 
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index a18d4f3..7669b67 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -511,7 +510,8 @@
 
/* If unset, use default local SCCP address */
if (!msc->a.bsc_addr.presence)
-   osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, 
msc->a.sccp, SCCP_SSN_BSSAP);
+   osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, 
msc->a.sccp,
+OSMO_SCCP_SSN_BSSAP);
 
if (!osmo_sccp_check_addr(&msc->a.bsc_addr, 
OSMO_SCCP_ADDR_T_SSN | OSMO_SCCP_ADDR_T_PC)) {
 

python/osmo-python-tests[master]: fix osmo_interact_* and osmo_verify_transcript_* after dir s...

2017-12-19 Thread Max

Patch Set 2:

How to reproduce the issues you mention in commit log?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I40a37b212274cb70ebb1e1d9d1b3743eb2d64d05
Gerrit-PatchSet: 2
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-sgsn[master]: Remove unneeded .py scripts

2017-12-19 Thread Max
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5512

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

Remove unneeded .py scripts

The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for
vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py
are not SGSN-specific: leftovers from repository split which are now
available in osmo-python-tests as well.

Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c
---
M Makefile.am
M configure.ac
D contrib/Makefile.am
D contrib/ipa.py
D contrib/soap.py
D contrib/twisted_ipa.py
M tests/ctrl_test_runner.py
M tests/vty_test_runner.py
8 files changed, 2 insertions(+), 863 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/12/5512/2

diff --git a/Makefile.am b/Makefile.am
index d57b66d..38fdcba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,6 @@
include \
src \
tests \
-   contrib \
$(NULL)
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/configure.ac b/configure.ac
index 8f279fd..2de31cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,5 +197,4 @@
 tests/v42bis/Makefile
 doc/Makefile
 doc/examples/Makefile
-contrib/Makefile
 Makefile)
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
deleted file mode 100644
index db6d0f5..000
--- a/contrib/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = ipa.py
diff --git a/contrib/ipa.py b/contrib/ipa.py
deleted file mode 100755
index 71cbf45..000
--- a/contrib/ipa.py
+++ /dev/null
@@ -1,278 +0,0 @@
-#!/usr/bin/python3
-# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
-"""
-/*
- * Copyright (C) 2016 sysmocom s.f.m.c. GmbH
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-"""
-
-import struct, random, sys
-
-class IPA(object):
-"""
-Stateless IPA protocol multiplexer: add/remove/parse (extended) header
-"""
-version = "0.0.5"
-TCP_PORT_OML = 3002
-TCP_PORT_RSL = 3003
-# OpenBSC extensions: OSMO, MGCP_OLD
-PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, 
MGCP_OLD=0xFC)
-# ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol
-EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6)
-# OpenBSC extension: SCCP_OLD
-MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, 
SCCP_OLD=0xFF)
-_IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, 
SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8)
-CTRL_GET = 'GET'
-CTRL_SET = 'SET'
-CTRL_REP = 'REPLY'
-CTRL_ERR = 'ERR'
-CTRL_TRAP = 'TRAP'
-
-def _l(self, d, p):
-"""
-Reverse dictionary lookup: return key for a given value
-"""
-if p is None:
-return 'UNKNOWN'
-return list(d.keys())[list(d.values()).index(p)]
-
-def _tag(self, t, v):
-"""
-Create TAG as TLV data
-"""
-return struct.pack(">HB", len(v) + 1, t) + v
-
-def proto(self, p):
-"""
-Lookup protocol name
-"""
-return self._l(self.PROTO, p)
-
-def ext(self, p):
-"""
-Lookup protocol extension name
-"""
-return self._l(self.EXT, p)
-
-def msgt(self, p):
-"""
-Lookup message type name
-"""
-return self._l(self.MSGT, p)
-
-def idtag(self, p):
-"""
-Lookup ID tag name
-"""
-return self._l(self._IDTAG, p)
-
-def ext_name(self, proto, exten):
-"""
-Return proper extension byte name depending on the protocol used
-"""
-if self.PROTO['CCM'] == proto:
-return self.msgt(exten)
-if self.PROTO['OSMO'] == proto:
-return self.ext(exten)
-return None
-
-def add_header(self, data, proto, ext=None):
-"""
-Add IPA header (with extension if necessary), data must be represented 
as bytes
-"""
-if ext is None:
-return struct.pack(">HB", len(data) + 1, proto) + data
-return struct.pack(">HBB", len(data) + 1, proto, ext) + data
-
-def del_header(self, data):
-"""
-Strip IPA protocol header correctly removing extension if present
-Returns data l

[PATCH] osmo-bsc[master]: Remove unused RRLP options/codec

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5476

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

Remove unused RRLP options/codec

RRLP is handled in OsmoMSC after the split from NITB, so let's remove
any bogus VTY commands left over in the BSC.

Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38
---
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M include/osmocom/bsc/Makefile.am
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
D include/osmocom/bsc/rrlp.h
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs_vty.c
M src/libcommon/gsm_data.c
9 files changed, 0 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/5476/4

diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index 64c3abd..6ad5e59 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -12,7 +12,6 @@
  encryption a5 0
  neci 0
  paging any use tch 0
- rrlp mode none
  mm info 0
  handover 0
  handover window rxlev averaging 10
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg 
b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index 7697481..5031f2c 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -11,7 +11,6 @@
  encryption a5 0
  neci 0
  paging any use tch 0
- rrlp mode none
  mm info 0
  handover 0
  handover window rxlev averaging 10
diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 1b86f9a..b067fc2 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -44,7 +44,6 @@
pcu_if.h \
pcuif_proto.h \
rest_octets.h \
-   rrlp.h \
rs232.h \
signal.h \
socket.h \
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 3268426..0f8bcb9 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -332,11 +332,6 @@
/* timer to expire old location updates */
struct osmo_timer_list subscr_expire_timer;
 
-   /* Radio Resource Location Protocol (TS 04.31) */
-   struct {
-   enum rrlp_mode mode;
-   } rrlp;
-
enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T];
 
/* Use a TCH for handling requests of type paging any */
@@ -519,9 +514,6 @@
 
 enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
 const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
-
-enum rrlp_mode rrlp_mode_parse(const char *arg);
-const char *rrlp_mode_name(enum rrlp_mode mode);
 
 enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid);
 const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
diff --git a/include/osmocom/bsc/gsm_data_shared.h 
b/include/osmocom/bsc/gsm_data_shared.h
index 9bbcabd..5d9b570 100644
--- a/include/osmocom/bsc/gsm_data_shared.h
+++ b/include/osmocom/bsc/gsm_data_shared.h
@@ -34,14 +34,6 @@
 
 struct osmo_bsc_sccp_con;
 
-/* RRLP mode of operation */
-enum rrlp_mode {
-   RRLP_MODE_NONE,
-   RRLP_MODE_MS_BASED,
-   RRLP_MODE_MS_PREF,
-   RRLP_MODE_ASS_PREF,
-};
-
 /* Channel Request reason */
 enum gsm_chreq_reason_t {
GSM_CHREQ_REASON_EMERG,
diff --git a/include/osmocom/bsc/rrlp.h b/include/osmocom/bsc/rrlp.h
deleted file mode 100644
index c89402a..000
--- a/include/osmocom/bsc/rrlp.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _RRLP_H
-#define _RRLP_H
-
-void on_dso_load_rrlp(void);
-
-#endif /* _RRLP_H */
-
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 9500645..6fa8e04 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -180,8 +180,6 @@
VTY_NEWLINE);
vty_out(vty, "  Use TCH for Paging any: %d%s", net->pag_any_tch,
VTY_NEWLINE);
-   vty_out(vty, "  RRLP Mode: %s%s", rrlp_mode_name(net->rrlp.mode),
-   VTY_NEWLINE);
vty_out(vty, "  MM Info: %s%s", net->send_mm_info ? "On" : "Off",
VTY_NEWLINE);
vty_out(vty, "  Handover: %s%s", net->handover.active ? "On" : "Off",
@@ -817,8 +815,6 @@
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, 
VTY_NEWLINE);
-   vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode),
-   VTY_NEWLINE);
vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE);
vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE);
vty_out(vty, " handover window rxlev averaging %u%s",
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index beb936b..8f6e4ef 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -133,22 +133,6 @@
return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_rrl

[PATCH] osmo-bsc[master]: Remove bogus vty config for LU reject cause

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5477

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

Remove bogus vty config for LU reject cause

The LU reject cause (like anything MM related) is under control of
OsmoMSC, not BSC.

Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6
---
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_vty.c
M src/libbsc/net_init.c
M src/libcommon-cs/common_cs_vty.c
6 files changed, 0 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/77/5477/4

diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index 6ad5e59..c7ba689 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -8,7 +8,6 @@
  mobile network code 1
  short name OsmoBSC
  long name OsmoBSC
- location updating reject cause 13
  encryption a5 0
  neci 0
  paging any use tch 0
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg 
b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index 5031f2c..341aa43 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -7,7 +7,6 @@
  mobile network code 1
  short name OsmoBSC
  long name OsmoBSC
- location updating reject cause 13
  encryption a5 0
  neci 0
  paging any use tch 0
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 0f8bcb9..8e4dc04 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -280,7 +280,6 @@
uint16_t network_code;
char *name_long;
char *name_short;
-   enum gsm48_reject_value reject_cause;
int a5_encryption;
int neci;
int send_mm_info;
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 6fa8e04..a73c6a4 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -172,8 +172,6 @@
vty_out(vty, "  Short network name: '%s'%s",
net->name_short, VTY_NEWLINE);
vty_out(vty, "%s", VTY_NEWLINE);
-   vty_out(vty, "  Location updating reject cause: %u%s",
-   net->reject_cause, VTY_NEWLINE);
vty_out(vty, "  Encryption: A5/%u%s", net->a5_encryption,
VTY_NEWLINE);
vty_out(vty, "  NECI (TCH/H): %u%s", net->neci,
@@ -810,8 +808,6 @@
vty_out(vty, " mobile network code %u%s", gsmnet->network_code, 
VTY_NEWLINE);
vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE);
vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE);
-   vty_out(vty, " location updating reject cause %u%s",
-   gsmnet->reject_cause, VTY_NEWLINE);
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, 
VTY_NEWLINE);
diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c
index 59a8d5c..30de0cc 100644
--- a/src/libbsc/net_init.c
+++ b/src/libbsc/net_init.c
@@ -42,7 +42,6 @@
INIT_LLIST_HEAD(&net->bsc_data->mscs);
 
net->num_bts = 0;
-   net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED;
net->T3101 = GSM_T3101_DEFAULT;
net->T3103 = GSM_T3103_DEFAULT;
net->T3105 = GSM_T3105_DEFAULT;
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index 8f6e4ef..2732ebf 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -102,22 +102,6 @@
return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_reject_cause,
-  cfg_net_reject_cause_cmd,
-  "location updating reject cause <2-111>",
-  "Set the reject cause of location updating reject\n"
-  "Set the reject cause of location updating reject\n"
-  "Set the reject cause of location updating reject\n"
-  "Set the reject cause of location updating reject\n"
-  "Cause Value as Per GSM TS 04.08\n")
-{
-   struct gsm_network *gsmnet = gsmnet_from_vty(vty);
-
-   gsmnet->reject_cause = atoi(argv[0]);
-
-   return CMD_SUCCESS;
-}
-
 DEFUN(cfg_net_encryption,
   cfg_net_encryption_cmd,
   "encryption a5 (0|1|2|3)",
@@ -264,7 +248,6 @@
install_element(GSMNET_NODE, &cfg_net_mnc_cmd);
install_element(GSMNET_NODE, &cfg_net_name_short_cmd);
install_element(GSMNET_NODE, &cfg_net_name_long_cmd);
-   install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd);
install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
install_element(GSMNET_NODE, &cfg_net_mm_info_cmd);
install_element(GSMNET_NODE, &cfg_net_timezone_cmd);

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Ge

[PATCH] osmo-bsc[master]: Remove dead code left over from NITB split

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5475

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

Remove dead code left over from NITB split

There still is a lot of dead code that we inherited from the NITB
days, let's remove more of it.

libtrau will be re-introduced as part of osmo-mgw later.

Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8
---
M configure.ac
M include/osmocom/bsc/Makefile.am
D include/osmocom/bsc/auth.h
M include/osmocom/bsc/bss.h
M include/osmocom/bsc/chan_alloc.h
M include/osmocom/bsc/common_bsc.h
M include/osmocom/bsc/common_cs.h
D include/osmocom/bsc/crc24.h
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
D include/osmocom/bsc/gsm_subscriber.h
M include/osmocom/bsc/ipaccess.h
D include/osmocom/bsc/mncc.h
D include/osmocom/bsc/mncc_int.h
D include/osmocom/bsc/msc_ifaces.h
D include/osmocom/bsc/rtp_proxy.h
M include/osmocom/bsc/signal.h
D include/osmocom/bsc/silent_call.h
D include/osmocom/bsc/smpp.h
D include/osmocom/bsc/sms_queue.h
D include/osmocom/bsc/transaction.h
D include/osmocom/bsc/trau_mux.h
D include/osmocom/bsc/trau_upqueue.h
M src/Makefile.am
M src/ipaccess/Makefile.am
M src/ipaccess/ipaccess-config.c
M src/libbsc/abis_rsl.c
M src/libbsc/bsc_api.c
M src/libbsc/bsc_init.c
M src/libbsc/chan_alloc.c
M src/libbsc/e1_config.c
M src/libbsc/gsm_04_08_utils.c
M src/libbsc/handover_logic.c
M src/libbsc/net_init.c
M src/libcommon-cs/common_cs.c
M src/libcommon-cs/common_cs_vty.c
M src/libcommon/Makefile.am
M src/libcommon/common_vty.c
D src/libcommon/gsm_subscriber_base.c
M src/libcommon/talloc_ctx.c
D src/libtrau/Makefile.am
D src/libtrau/rtp_proxy.c
D src/libtrau/trau_mux.c
D src/libtrau/trau_upqueue.c
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc_nat/Makefile.am
M src/osmo-bsc_nat/bsc_filter.c
M src/utils/Makefile.am
M src/utils/bs11_config.c
M tests/Makefile.am
M tests/abis/Makefile.am
M tests/bsc-nat-trie/Makefile.am
M tests/bsc-nat/Makefile.am
M tests/bsc/Makefile.am
M tests/bsc/bsc_test.c
M tests/bssap/Makefile.am
M tests/bssap/bssap_test.c
M tests/channel/channel_test.c
M tests/gsm0408/Makefile.am
M tests/gsm0408/gsm0408_test.c
M tests/nanobts_omlattr/Makefile.am
M tests/subscr/Makefile.am
M tests/testsuite.at
D tests/trau/Makefile.am
D tests/trau/trau_test.c
D tests/trau/trau_test.ok
68 files changed, 25 insertions(+), 2,484 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/75/5475/4

diff --git a/configure.ac b/configure.ac
index b7dd016..540d2cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,7 +145,6 @@
 include/osmocom/Makefile
 include/osmocom/bsc/Makefile
 src/Makefile
-src/libtrau/Makefile
 src/libbsc/Makefile
 src/libcommon/Makefile
 src/libfilter/Makefile
@@ -161,7 +160,6 @@
 tests/bsc-nat/Makefile
 tests/bsc-nat-trie/Makefile
 tests/abis/Makefile
-tests/trau/Makefile
 tests/subscr/Makefile
 tests/nanobts_omlattr/Makefile
 tests/bssap/Makefile
diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 9d2ee6e..1b86f9a 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -4,7 +4,6 @@
abis_om2000.h \
abis_rsl.h \
arfcn_range_encode.h \
-   auth.h \
bsc_msc.h \
bsc_msg_filter.h \
bsc_nat.h \
@@ -18,7 +17,6 @@
common.h \
common_bsc.h \
common_cs.h \
-   crc24.h \
ctrl.h \
debug.h \
e1_config.h \
@@ -26,16 +24,12 @@
gsm_04_80.h \
gsm_data.h \
gsm_data_shared.h \
-   gsm_subscriber.h \
handover.h \
handover_decision.h \
ipaccess.h \
meas_feed.h \
meas_rep.h \
misdn.h \
-   mncc.h \
-   mncc_int.h \
-   msc_ifaces.h \
nat_rewrite_trie.h \
network_listen.h \
openbscdefines.h \
@@ -52,15 +46,9 @@
rest_octets.h \
rrlp.h \
rs232.h \
-   rtp_proxy.h \
signal.h \
-   silent_call.h \
-   sms_queue.h \
socket.h \
system_information.h \
-   transaction.h \
-   trau_mux.h \
-   trau_upqueue.h \
ussd.h \
vty.h \
bsc_api.h \
diff --git a/include/osmocom/bsc/auth.h b/include/osmocom/bsc/auth.h
deleted file mode 100644
index b314bbf..000
--- a/include/osmocom/bsc/auth.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _AUTH_H
-#define _AUTH_H
-
-#include 
-
-struct gsm_auth_tuple;
-
-enum auth_action {
-   AUTH_ERROR  = -1,   /* Internal error */
-   AUTH_NOT_AVAIL  = 0,/* No auth tuple available */
-   AUTH_DO_AUTH_THEN_CIPH  = 1,/* Firsth authenticate, then cipher */
-   AUTH_DO_CIPH= 2,/* Only ciphering */
-   AUTH_DO_AUTH= 3,/* Only authentication, no ciphering */
-};
-
-extern const struct value_string auth_action_n

[PATCH] osmo-bsc[master]: Remove bogus MM INFO configuration

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5478

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

Remove bogus MM INFO configuration

The network name and other MM INFO is controlled by the MSC, not the BSC.

Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58
---
M doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_ctrl_commands.c
M src/libbsc/bsc_init.c
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs_vty.c
8 files changed, 0 insertions(+), 100 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/5478/4

diff --git a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg 
b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
index c972e06..850e29c 100644
--- a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
@@ -1,9 +1,6 @@
 network
  network country code 901
  mobile network code 70
- mm info 1
- short name OsmoBSC
- long name OsmoBSC
  bts 0
   type sysmobts
   band GSM-1800
diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index c7ba689..17412f7 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -6,12 +6,9 @@
 network
  network country code 1
  mobile network code 1
- short name OsmoBSC
- long name OsmoBSC
  encryption a5 0
  neci 0
  paging any use tch 0
- mm info 0
  handover 0
  handover window rxlev averaging 10
  handover window rxqual averaging 1
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg 
b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index 341aa43..581d541 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -5,12 +5,9 @@
 network
  network country code 1
  mobile network code 1
- short name OsmoBSC
- long name OsmoBSC
  encryption a5 0
  neci 0
  paging any use tch 0
- mm info 0
  handover 0
  handover window rxlev averaging 10
  handover window rxqual averaging 1
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 8e4dc04..7a1b62d 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -278,8 +278,6 @@
/* global parameters */
uint16_t country_code;
uint16_t network_code;
-   char *name_long;
-   char *name_short;
int a5_encryption;
int neci;
int send_mm_info;
diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c
index 2d6fcb6..41d2361 100644
--- a/src/libbsc/bsc_ctrl_commands.c
+++ b/src/libbsc/bsc_ctrl_commands.c
@@ -30,45 +30,8 @@
 #include 
 #include 
 
-#define CTRL_CMD_VTY_STRING(cmdname, cmdstr, dtype, element) \
-   CTRL_HELPER_GET_STRING(cmdname, dtype, element) \
-   CTRL_HELPER_SET_STRING(cmdname, dtype, element) \
-static struct ctrl_cmd_element cmd_##cmdname = { \
-   .name = cmdstr, \
-   .get = get_##cmdname, \
-   .set = set_##cmdname, \
-   .verify = verify_vty_description_string, \
-}
-
-/**
- * Check that there are no newlines or comments or other things
- * that could make the VTY configuration unparsable.
- */
-static int verify_vty_description_string(struct ctrl_cmd *cmd,
-   const char *value, void *data)
-{
-   int i;
-   const size_t len = strlen(value);
-
-   for (i = 0; i < len; ++i) {
-   switch(value[i]) {
-   case '#':
-   case '\n':
-   case '\r':
-   cmd->reply = "String includes illegal character";
-   return -1;
-   default:
-   break;
-   }
-   }
-
-   return 0;
-}
-
 CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 
999);
 CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 
999);
-CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, 
name_short);
-CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long);
 
 static int set_net_apply_config(struct ctrl_cmd *cmd, void *data)
 {
@@ -452,8 +415,6 @@
int rc = 0;
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc);
-   rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_short_name);
-   rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_long_name);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock);
diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index 34dfd36..c5a75aa 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -536,9 +536,6 @@
if (!bsc_gsmnet)
return -ENOMEM;
 
-   bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenB

[MERGED] osmo-bsc[master]: Remove unneeded .py scripts

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

Change subject: Remove unneeded .py scripts
..


Remove unneeded .py scripts

The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for
vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py
are not BSC-specific: leftovers from repository split which are now
available in osmo-python-tests as well.

Change-Id: Ia4285b18b152b070c148228604d1e61a8adedba1
---
M Makefile.am
M configure.ac
D contrib/Makefile.am
D contrib/bsc_control.py
D contrib/ipa.py
D contrib/soap.py
D contrib/twisted_ipa.py
M tests/ctrl_test_runner.py
M tests/vty_test_runner.py
9 files changed, 2 insertions(+), 983 deletions(-)

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



diff --git a/Makefile.am b/Makefile.am
index 690deae..2f0a786 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,6 @@
include \
src \
tests \
-   contrib \
$(NULL)
 
 BUILT_SOURCES = $(top_srcdir)/.version
diff --git a/configure.ac b/configure.ac
index b7dd016..bdcf026 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,5 +167,4 @@
 tests/bssap/Makefile
 doc/Makefile
 doc/examples/Makefile
-contrib/Makefile
 Makefile)
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
deleted file mode 100644
index db6d0f5..000
--- a/contrib/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = ipa.py
diff --git a/contrib/bsc_control.py b/contrib/bsc_control.py
deleted file mode 100755
index c1b09ce..000
--- a/contrib/bsc_control.py
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/python
-# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
-"""
-/*
- * Copyright (C) 2016 sysmocom s.f.m.c. GmbH
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-"""
-
-from optparse import OptionParser
-from ipa import Ctrl
-import socket
-
-verbose = False
-
-def connect(host, port):
-if verbose:
-print "Connecting to host %s:%i" % (host, port)
-
-sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-sck.setblocking(1)
-sck.connect((host, port))
-return sck
-
-def do_set_get(sck, var, value = None):
-(r, c) = Ctrl().cmd(var, value)
-sck.send(c)
-answer = Ctrl().rem_header(sck.recv(4096))
-return (answer,) + Ctrl().verify(answer, r, var, value)
-
-def set_var(sck, var, val):
-(a, _, _) = do_set_get(sck, var, val)
-return a
-
-def get_var(sck, var):
-(_, _, v) = do_set_get(sck, var)
-return v
-
-def _leftovers(sck, fl):
-"""
-Read outstanding data if any according to flags
-"""
-try:
-data = sck.recv(1024, fl)
-except socket.error as (s_errno, strerror):
-return False
-if len(data) != 0:
-tail = data
-while True:
-(head, tail) = Ctrl().split_combined(tail)
-print "Got message:", Ctrl().rem_header(head)
-if len(tail) == 0:
-break
-return True
-return False
-
-if __name__ == '__main__':
-parser = OptionParser("Usage: %prog [options] var [value]")
-parser.add_option("-d", "--host", dest="host",
-  help="connect to HOST", metavar="HOST")
-parser.add_option("-p", "--port", dest="port", type="int",
-  help="use PORT", metavar="PORT", default=4249)
-parser.add_option("-g", "--get", action="store_true",
-  dest="cmd_get", help="perform GET operation")
-parser.add_option("-s", "--set", action="store_true",
-  dest="cmd_set", help="perform SET operation")
-parser.add_option("-v", "--verbose", action="store_true",
-  dest="verbose", help="be verbose", default=False)
-parser.add_option("-m", "--monitor", action="store_true",
-  dest="monitor", help="monitor the connection for 
traps", default=False)
-
-(options, args) = parser.parse_args()
-
-verbose = options.verbose
-
-if opti

[MERGED] osmo-sgsn[master]: Remove unneeded .py scripts

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

Change subject: Remove unneeded .py scripts
..


Remove unneeded .py scripts

The ipa.py has been moved to osmo-python-tests as osmo_ipa - use it for
vty and ctrl tests instead of local copy. The soap.py and twisted_ipa.py
are not SGSN-specific: leftovers from repository split which are now
available in osmo-python-tests as well.

Change-Id: I3ef4ca790878921a5846f64942a8de8a6ff9c11c
---
M Makefile.am
M configure.ac
D contrib/Makefile.am
D contrib/ipa.py
D contrib/soap.py
D contrib/twisted_ipa.py
M tests/ctrl_test_runner.py
M tests/vty_test_runner.py
8 files changed, 2 insertions(+), 863 deletions(-)

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



diff --git a/Makefile.am b/Makefile.am
index d57b66d..38fdcba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,6 @@
include \
src \
tests \
-   contrib \
$(NULL)
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/configure.ac b/configure.ac
index 8f279fd..2de31cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,5 +197,4 @@
 tests/v42bis/Makefile
 doc/Makefile
 doc/examples/Makefile
-contrib/Makefile
 Makefile)
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
deleted file mode 100644
index db6d0f5..000
--- a/contrib/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST = ipa.py
diff --git a/contrib/ipa.py b/contrib/ipa.py
deleted file mode 100755
index 71cbf45..000
--- a/contrib/ipa.py
+++ /dev/null
@@ -1,278 +0,0 @@
-#!/usr/bin/python3
-# -*- mode: python-mode; py-indent-tabs-mode: nil -*-
-"""
-/*
- * Copyright (C) 2016 sysmocom s.f.m.c. GmbH
- *
- * All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-"""
-
-import struct, random, sys
-
-class IPA(object):
-"""
-Stateless IPA protocol multiplexer: add/remove/parse (extended) header
-"""
-version = "0.0.5"
-TCP_PORT_OML = 3002
-TCP_PORT_RSL = 3003
-# OpenBSC extensions: OSMO, MGCP_OLD
-PROTO = dict(RSL=0x00, CCM=0xFE, SCCP=0xFD, OML=0xFF, OSMO=0xEE, 
MGCP_OLD=0xFC)
-# ...OML Router Control, GSUP GPRS extension, Osmocom Authn Protocol
-EXT = dict(CTRL=0, MGCP=1, LAC=2, SMSC=3, ORC=4, GSUP=5, OAP=6)
-# OpenBSC extension: SCCP_OLD
-MSGT = dict(PING=0x00, PONG=0x01, ID_GET=0x04, ID_RESP=0x05, ID_ACK=0x06, 
SCCP_OLD=0xFF)
-_IDTAG = dict(SERNR=0, UNITNAME=1, LOCATION=2, TYPE=3, EQUIPVERS=4, 
SWVERSION=5, IPADDR=6, MACADDR=7, UNIT=8)
-CTRL_GET = 'GET'
-CTRL_SET = 'SET'
-CTRL_REP = 'REPLY'
-CTRL_ERR = 'ERR'
-CTRL_TRAP = 'TRAP'
-
-def _l(self, d, p):
-"""
-Reverse dictionary lookup: return key for a given value
-"""
-if p is None:
-return 'UNKNOWN'
-return list(d.keys())[list(d.values()).index(p)]
-
-def _tag(self, t, v):
-"""
-Create TAG as TLV data
-"""
-return struct.pack(">HB", len(v) + 1, t) + v
-
-def proto(self, p):
-"""
-Lookup protocol name
-"""
-return self._l(self.PROTO, p)
-
-def ext(self, p):
-"""
-Lookup protocol extension name
-"""
-return self._l(self.EXT, p)
-
-def msgt(self, p):
-"""
-Lookup message type name
-"""
-return self._l(self.MSGT, p)
-
-def idtag(self, p):
-"""
-Lookup ID tag name
-"""
-return self._l(self._IDTAG, p)
-
-def ext_name(self, proto, exten):
-"""
-Return proper extension byte name depending on the protocol used
-"""
-if self.PROTO['CCM'] == proto:
-return self.msgt(exten)
-if self.PROTO['OSMO'] == proto:
-return self.ext(exten)
-return None
-
-def add_header(self, data, proto, ext=None):
-"""
-Add IPA header (with extension if necessary), data must be represented 
as bytes
-"""
-if ext is None:
-return struct.pack(">HB", len(data) + 1, proto) + data
-return struct.pack(">HBB", len(data) + 1, proto, ext) + data
-
-def del_header(self, data):
-"""
-Strip IPA protocol header correctly removing extensio

osmo-sgsn[master]: Remove unneeded .py scripts

2017-12-19 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


osmo-bsc[master]: remove libosmo-sccp dependency for osmo-bsc

2017-12-19 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


osmo-bsc[master]: Remove unneeded .py scripts

2017-12-19 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-bsc[master]: bsc_test.c: Use proper network/bts/lchan structures

2017-12-19 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


osmo-bsc[master]: Remove dead code left over from NITB split

2017-12-19 Thread Harald Welte

Patch Set 4: Code-Review+2

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

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


osmo-bsc[master]: osmo-bsc: Move user plane/voice related bits into sub-structure

2017-12-19 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


osmo-bsc[master]: osmo_bsc_bssap.c: Spelling fixes in comment

2017-12-19 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


osmo-bsc[master]: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'

2017-12-19 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


osmo-bsc[master]: gsm_data.h: Document all fields of gsm_subscriber_connection

2017-12-19 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


osmo-bsc[master]: remove unused 'lac' member of 'struct gsm_subscriber_connect...

2017-12-19 Thread Harald Welte

Patch Set 3: Code-Review+2

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

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


osmo-bsc[master]: Remove bogus vty config for LU reject cause

2017-12-19 Thread Harald Welte

Patch Set 4: Code-Review+2

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

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


osmo-bsc[master]: Remove bogus MM INFO configuration

2017-12-19 Thread Harald Welte

Patch Set 4: Code-Review+2

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

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


osmo-bsc[master]: Remove unused RRLP options/codec

2017-12-19 Thread Harald Welte

Patch Set 4: Code-Review+2

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

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


osmo-bsc[master]: Remove some more dead code

2017-12-19 Thread Harald Welte

Patch Set 4: Code-Review+2

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

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


[MERGED] osmo-bsc[master]: Remove some more dead code

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

Change subject: Remove some more dead code
..


Remove some more dead code

Change-Id: I919bffe88babd90227c89abd4434322965c32ebb
---
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
M src/libcommon-cs/common_cs.c
M src/libcommon/gsm_data.c
4 files changed, 0 insertions(+), 163 deletions(-)

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



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 7a1b62d..1cedef0 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -24,9 +24,7 @@
 
 #define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3]
 
-struct gsm_subscriber_group;
 struct bsc_subscr;
-struct vlr_instance;
 struct gprs_ra_id;
 
 #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3]
@@ -40,26 +38,11 @@
 #define EARFCN_QRXLV_INVALID 32
 #define EARFCN_THRESH_LOW_INVALID 32
 
-enum gsm_security_event {
-   GSM_SECURITY_NOAVAIL,
-   GSM_SECURITY_AUTH_FAILED,
-   GSM_SECURITY_SUCCEEDED,
-   GSM_SECURITY_ALREADY,
-};
-
 struct msgb;
 typedef int gsm_cbfn(unsigned int hooknum,
 unsigned int event,
 struct msgb *msg,
 void *data, void *param);
-
-/*
- * A dummy to keep a connection up for at least
- * a couple of seconds to work around MSC issues.
- */
-struct gsm_anchor_operation {
-   struct osmo_timer_list timeout;
-};
 
 /* Maximum number of neighbor cells whose average we track */
 #define MAX_NEIGH_MEAS 10
@@ -75,16 +58,6 @@
uint8_t last_seen_nr;
 };
 
-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;
@@ -92,12 +65,6 @@
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,
 };
 
 /* active radio connection of a mobile subscriber */
@@ -125,29 +92,6 @@
struct gsm_classmark classmark;
 
uint16_t lac;
-   struct gsm_encr encr;
-
-   struct {
-   unsigned int mgcp_rtp_endpoint;
-   uint16_t port_subscr;
-   uint16_t port_cn;
-   } rtp;
-
-   struct {
-   /* A pointer to the SCCP user that handles
-* the SCCP connections for this subscriber
-* connection */
-   struct osmo_sccp_user *scu;
-
-   /* The address of the BSC that is associated
-* with this subscriber connection */
-   struct osmo_sccp_addr bsc_addr;
-
-   /* The connection identifier that is used
-* to reference the SCCP connection that is
-* associated with this subscriber connection */
-   int conn_id;
-   } a;
 };
 
 
@@ -241,13 +185,6 @@
bsc_ctr_description,
 };
 
-enum gsm_auth_policy {
-   GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */
-   GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized 
in DB */
-   GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke 
authorization */
-   GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */
-};
-
 #define GSM_T3101_DEFAULT 3/* s */
 #define GSM_T3103_DEFAULT 5/* s */
 #define GSM_T3105_DEFAULT 100  /* ms */
@@ -280,7 +217,6 @@
uint16_t network_code;
int a5_encryption;
int neci;
-   int send_mm_info;
struct {
int active;
/* Window RXLEV averaging */
@@ -299,7 +235,6 @@
} handover;
 
struct rate_ctr_group *bsc_ctrs;
-   struct osmo_counter *active_calls;
 
/*
 * TODO: Move the trans_list into the subscriber connection and
@@ -361,12 +296,6 @@
 * pointer is NULL to indicate absence of a bsc_subscribers list. */
struct llist_head *bsc_subscribers;
 
-   /* MSC: GSUP server address of the HLR */
-   const char *gsup_server_addr_str;
-   uint16_t gsup_server_port;
-
-   struct vlr_instance *vlr;
-
/* Periodic location update default value */
uint8_t t3212;
 
@@ -374,65 +303,6 @@
struct mgcp_client_conf *conf;
struct mgcp_client *client;
} mgw;
-
-   struct {
-   /* CS7 instance id number (set via VTY) */
-   uint32_t cs7_i

[MERGED] osmo-bsc[master]: Remove bogus MM INFO configuration

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

Change subject: Remove bogus MM INFO configuration
..


Remove bogus MM INFO configuration

The network name and other MM INFO is controlled by the MSC, not the BSC.

Change-Id: I1cbf72fc50cff29e7c1633ba752cbf15b4b84c58
---
M doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_ctrl_commands.c
M src/libbsc/bsc_init.c
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs_vty.c
8 files changed, 0 insertions(+), 100 deletions(-)

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



diff --git a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg 
b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
index c972e06..850e29c 100644
--- a/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
@@ -1,9 +1,6 @@
 network
  network country code 901
  mobile network code 70
- mm info 1
- short name OsmoBSC
- long name OsmoBSC
  bts 0
   type sysmobts
   band GSM-1800
diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index c7ba689..17412f7 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -6,12 +6,9 @@
 network
  network country code 1
  mobile network code 1
- short name OsmoBSC
- long name OsmoBSC
  encryption a5 0
  neci 0
  paging any use tch 0
- mm info 0
  handover 0
  handover window rxlev averaging 10
  handover window rxqual averaging 1
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg 
b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index 341aa43..581d541 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -5,12 +5,9 @@
 network
  network country code 1
  mobile network code 1
- short name OsmoBSC
- long name OsmoBSC
  encryption a5 0
  neci 0
  paging any use tch 0
- mm info 0
  handover 0
  handover window rxlev averaging 10
  handover window rxqual averaging 1
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 8e4dc04..7a1b62d 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -278,8 +278,6 @@
/* global parameters */
uint16_t country_code;
uint16_t network_code;
-   char *name_long;
-   char *name_short;
int a5_encryption;
int neci;
int send_mm_info;
diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c
index 2d6fcb6..41d2361 100644
--- a/src/libbsc/bsc_ctrl_commands.c
+++ b/src/libbsc/bsc_ctrl_commands.c
@@ -30,45 +30,8 @@
 #include 
 #include 
 
-#define CTRL_CMD_VTY_STRING(cmdname, cmdstr, dtype, element) \
-   CTRL_HELPER_GET_STRING(cmdname, dtype, element) \
-   CTRL_HELPER_SET_STRING(cmdname, dtype, element) \
-static struct ctrl_cmd_element cmd_##cmdname = { \
-   .name = cmdstr, \
-   .get = get_##cmdname, \
-   .set = set_##cmdname, \
-   .verify = verify_vty_description_string, \
-}
-
-/**
- * Check that there are no newlines or comments or other things
- * that could make the VTY configuration unparsable.
- */
-static int verify_vty_description_string(struct ctrl_cmd *cmd,
-   const char *value, void *data)
-{
-   int i;
-   const size_t len = strlen(value);
-
-   for (i = 0; i < len; ++i) {
-   switch(value[i]) {
-   case '#':
-   case '\n':
-   case '\r':
-   cmd->reply = "String includes illegal character";
-   return -1;
-   default:
-   break;
-   }
-   }
-
-   return 0;
-}
-
 CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 
999);
 CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 
999);
-CTRL_CMD_VTY_STRING(net_short_name, "short-name", struct gsm_network, 
name_short);
-CTRL_CMD_VTY_STRING(net_long_name, "long-name", struct gsm_network, name_long);
 
 static int set_net_apply_config(struct ctrl_cmd *cmd, void *data)
 {
@@ -452,8 +415,6 @@
int rc = 0;
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mnc);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc);
-   rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_short_name);
-   rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_long_name);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_apply_config);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_mcc_mnc_apply);
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_net_rf_lock);
diff --git a/src/libbsc/bsc_init.c b/src/libbsc/bsc_init.c
index 34dfd36..c5a75aa 100644
--- a/src/libbsc/bsc_init.c
+++ b/src/libbsc/bsc_init.c
@@ -536,9 +536,6 @@
if (!bsc_gsmnet)
return -ENOMEM;
 
-   bsc_gsmnet->

[MERGED] osmo-bsc[master]: Remove dead code left over from NITB split

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

Change subject: Remove dead code left over from NITB split
..


Remove dead code left over from NITB split

There still is a lot of dead code that we inherited from the NITB
days, let's remove more of it.

libtrau will be re-introduced as part of osmo-mgw later.

Change-Id: I8e0af56a158f25a4f1384d667c03eb20e72df5b8
---
M configure.ac
M include/osmocom/bsc/Makefile.am
D include/osmocom/bsc/auth.h
M include/osmocom/bsc/bss.h
M include/osmocom/bsc/chan_alloc.h
M include/osmocom/bsc/common_bsc.h
M include/osmocom/bsc/common_cs.h
D include/osmocom/bsc/crc24.h
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
D include/osmocom/bsc/gsm_subscriber.h
M include/osmocom/bsc/ipaccess.h
D include/osmocom/bsc/mncc.h
D include/osmocom/bsc/mncc_int.h
D include/osmocom/bsc/msc_ifaces.h
D include/osmocom/bsc/rtp_proxy.h
M include/osmocom/bsc/signal.h
D include/osmocom/bsc/silent_call.h
D include/osmocom/bsc/smpp.h
D include/osmocom/bsc/sms_queue.h
D include/osmocom/bsc/transaction.h
D include/osmocom/bsc/trau_mux.h
D include/osmocom/bsc/trau_upqueue.h
M src/Makefile.am
M src/ipaccess/Makefile.am
M src/ipaccess/ipaccess-config.c
M src/libbsc/abis_rsl.c
M src/libbsc/bsc_api.c
M src/libbsc/bsc_init.c
M src/libbsc/chan_alloc.c
M src/libbsc/e1_config.c
M src/libbsc/gsm_04_08_utils.c
M src/libbsc/handover_logic.c
M src/libbsc/net_init.c
M src/libcommon-cs/common_cs.c
M src/libcommon-cs/common_cs_vty.c
M src/libcommon/Makefile.am
M src/libcommon/common_vty.c
D src/libcommon/gsm_subscriber_base.c
M src/libcommon/talloc_ctx.c
D src/libtrau/Makefile.am
D src/libtrau/rtp_proxy.c
D src/libtrau/trau_mux.c
D src/libtrau/trau_upqueue.c
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc_nat/Makefile.am
M src/osmo-bsc_nat/bsc_filter.c
M src/utils/Makefile.am
M src/utils/bs11_config.c
M tests/Makefile.am
M tests/abis/Makefile.am
M tests/bsc-nat-trie/Makefile.am
M tests/bsc-nat/Makefile.am
M tests/bsc/Makefile.am
M tests/bsc/bsc_test.c
M tests/bssap/Makefile.am
M tests/bssap/bssap_test.c
M tests/channel/channel_test.c
M tests/gsm0408/Makefile.am
M tests/gsm0408/gsm0408_test.c
M tests/nanobts_omlattr/Makefile.am
M tests/subscr/Makefile.am
M tests/testsuite.at
D tests/trau/Makefile.am
D tests/trau/trau_test.c
D tests/trau/trau_test.ok
68 files changed, 25 insertions(+), 2,484 deletions(-)

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



diff --git a/configure.ac b/configure.ac
index bdcf026..98f96bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,7 +145,6 @@
 include/osmocom/Makefile
 include/osmocom/bsc/Makefile
 src/Makefile
-src/libtrau/Makefile
 src/libbsc/Makefile
 src/libcommon/Makefile
 src/libfilter/Makefile
@@ -161,7 +160,6 @@
 tests/bsc-nat/Makefile
 tests/bsc-nat-trie/Makefile
 tests/abis/Makefile
-tests/trau/Makefile
 tests/subscr/Makefile
 tests/nanobts_omlattr/Makefile
 tests/bssap/Makefile
diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 9d2ee6e..1b86f9a 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -4,7 +4,6 @@
abis_om2000.h \
abis_rsl.h \
arfcn_range_encode.h \
-   auth.h \
bsc_msc.h \
bsc_msg_filter.h \
bsc_nat.h \
@@ -18,7 +17,6 @@
common.h \
common_bsc.h \
common_cs.h \
-   crc24.h \
ctrl.h \
debug.h \
e1_config.h \
@@ -26,16 +24,12 @@
gsm_04_80.h \
gsm_data.h \
gsm_data_shared.h \
-   gsm_subscriber.h \
handover.h \
handover_decision.h \
ipaccess.h \
meas_feed.h \
meas_rep.h \
misdn.h \
-   mncc.h \
-   mncc_int.h \
-   msc_ifaces.h \
nat_rewrite_trie.h \
network_listen.h \
openbscdefines.h \
@@ -52,15 +46,9 @@
rest_octets.h \
rrlp.h \
rs232.h \
-   rtp_proxy.h \
signal.h \
-   silent_call.h \
-   sms_queue.h \
socket.h \
system_information.h \
-   transaction.h \
-   trau_mux.h \
-   trau_upqueue.h \
ussd.h \
vty.h \
bsc_api.h \
diff --git a/include/osmocom/bsc/auth.h b/include/osmocom/bsc/auth.h
deleted file mode 100644
index b314bbf..000
--- a/include/osmocom/bsc/auth.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _AUTH_H
-#define _AUTH_H
-
-#include 
-
-struct gsm_auth_tuple;
-
-enum auth_action {
-   AUTH_ERROR  = -1,   /* Internal error */
-   AUTH_NOT_AVAIL  = 0,/* No auth tuple available */
-   AUTH_DO_AUTH_THEN_CIPH  = 1,/* Firsth authenticate, then cipher */
-   AUTH_DO_CIPH= 2,/* Only ciphering */
-   AUTH_DO_AUTH= 3,/* Only authentication, no ciphering */
-

[MERGED] osmo-bsc[master]: osmo_bsc_bssap.c: Spelling fixes in comment

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

Change subject: osmo_bsc_bssap.c: Spelling fixes in comment
..


osmo_bsc_bssap.c: Spelling fixes in comment

Change-Id: I32b2d08bf25cd2d343755ac8491e4f5f758ccee6
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 4fd43aa..aea3994 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -385,7 +385,7 @@
  * a cipher we will have to send cipher mode reject to the MSC,
  * otherwise we will have to pick something that we and the MS
  * is supporting. Currently we are doing it in a rather static
- * way by picking one ecnryption or no encrytpion.
+ * way by picking one encryption or no encryption.
  */
 static int bssmap_handle_cipher_mode(struct osmo_bsc_sccp_con *conn,
 struct msgb *msg, unsigned int 
payload_length)
@@ -613,7 +613,7 @@
   get_value_string(gsm48_chan_mode_names, chan_mode),
   ct.ch_indctr, ct.ch_rate_type, osmo_hexdump(ct.perm_spch, 
ct.perm_spch_len));
 
-   /* Forward the assingment request to lower layers */
+   /* Forward the assignment request to lower layers */
if (aoip) {
/* Store network side RTP connection information, we will
 * process this address later after we have established an RTP
@@ -626,7 +626,7 @@
/* Create an assignment request using the MGCP fsm. This FSM
 * is directly started when its created (now) and will also
 * take care about the further processing (creating RTP
-* endpoints, calling gsm0808_assign_req(), rsponding to
+* endpoints, calling gsm0808_assign_req(), responding to
 * the assignment request etc... */
conn->mgcp_ctx = mgcp_assignm_req(msc->network, 
msc->network->mgw.client, conn, chan_mode, full_rate);
if (!conn->mgcp_ctx) {

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

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


[MERGED] osmo-bsc[master]: Remove bogus vty config for LU reject cause

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

Change subject: Remove bogus vty config for LU reject cause
..


Remove bogus vty config for LU reject cause

The LU reject cause (like anything MM related) is under control of
OsmoMSC, not BSC.

Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace6
---
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_vty.c
M src/libbsc/net_init.c
M src/libcommon-cs/common_cs_vty.c
6 files changed, 0 insertions(+), 25 deletions(-)

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



diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index 6ad5e59..c7ba689 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -8,7 +8,6 @@
  mobile network code 1
  short name OsmoBSC
  long name OsmoBSC
- location updating reject cause 13
  encryption a5 0
  neci 0
  paging any use tch 0
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg 
b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index 5031f2c..341aa43 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -7,7 +7,6 @@
  mobile network code 1
  short name OsmoBSC
  long name OsmoBSC
- location updating reject cause 13
  encryption a5 0
  neci 0
  paging any use tch 0
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 0f8bcb9..8e4dc04 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -280,7 +280,6 @@
uint16_t network_code;
char *name_long;
char *name_short;
-   enum gsm48_reject_value reject_cause;
int a5_encryption;
int neci;
int send_mm_info;
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 6fa8e04..a73c6a4 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -172,8 +172,6 @@
vty_out(vty, "  Short network name: '%s'%s",
net->name_short, VTY_NEWLINE);
vty_out(vty, "%s", VTY_NEWLINE);
-   vty_out(vty, "  Location updating reject cause: %u%s",
-   net->reject_cause, VTY_NEWLINE);
vty_out(vty, "  Encryption: A5/%u%s", net->a5_encryption,
VTY_NEWLINE);
vty_out(vty, "  NECI (TCH/H): %u%s", net->neci,
@@ -810,8 +808,6 @@
vty_out(vty, " mobile network code %u%s", gsmnet->network_code, 
VTY_NEWLINE);
vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE);
vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE);
-   vty_out(vty, " location updating reject cause %u%s",
-   gsmnet->reject_cause, VTY_NEWLINE);
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, 
VTY_NEWLINE);
diff --git a/src/libbsc/net_init.c b/src/libbsc/net_init.c
index 59a8d5c..30de0cc 100644
--- a/src/libbsc/net_init.c
+++ b/src/libbsc/net_init.c
@@ -42,7 +42,6 @@
INIT_LLIST_HEAD(&net->bsc_data->mscs);
 
net->num_bts = 0;
-   net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED;
net->T3101 = GSM_T3101_DEFAULT;
net->T3103 = GSM_T3103_DEFAULT;
net->T3105 = GSM_T3105_DEFAULT;
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index 8f6e4ef..2732ebf 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -102,22 +102,6 @@
return CMD_SUCCESS;
 }
 
-DEFUN(cfg_net_reject_cause,
-  cfg_net_reject_cause_cmd,
-  "location updating reject cause <2-111>",
-  "Set the reject cause of location updating reject\n"
-  "Set the reject cause of location updating reject\n"
-  "Set the reject cause of location updating reject\n"
-  "Set the reject cause of location updating reject\n"
-  "Cause Value as Per GSM TS 04.08\n")
-{
-   struct gsm_network *gsmnet = gsmnet_from_vty(vty);
-
-   gsmnet->reject_cause = atoi(argv[0]);
-
-   return CMD_SUCCESS;
-}
-
 DEFUN(cfg_net_encryption,
   cfg_net_encryption_cmd,
   "encryption a5 (0|1|2|3)",
@@ -264,7 +248,6 @@
install_element(GSMNET_NODE, &cfg_net_mnc_cmd);
install_element(GSMNET_NODE, &cfg_net_name_short_cmd);
install_element(GSMNET_NODE, &cfg_net_name_long_cmd);
-   install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd);
install_element(GSMNET_NODE, &cfg_net_encryption_cmd);
install_element(GSMNET_NODE, &cfg_net_mm_info_cmd);
install_element(GSMNET_NODE, &cfg_net_timezone_cmd);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I559ae31d67726845c9699c8b6127e21c6f63ace

[MERGED] osmo-bsc[master]: Remove unused RRLP options/codec

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

Change subject: Remove unused RRLP options/codec
..


Remove unused RRLP options/codec

RRLP is handled in OsmoMSC after the split from NITB, so let's remove
any bogus VTY commands left over in the BSC.

Change-Id: Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38
---
M doc/examples/osmo-bsc/osmo-bsc.cfg
M doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
M include/osmocom/bsc/Makefile.am
M include/osmocom/bsc/gsm_data.h
M include/osmocom/bsc/gsm_data_shared.h
D include/osmocom/bsc/rrlp.h
M src/libbsc/bsc_vty.c
M src/libcommon-cs/common_cs_vty.c
M src/libcommon/gsm_data.c
9 files changed, 0 insertions(+), 65 deletions(-)

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



diff --git a/doc/examples/osmo-bsc/osmo-bsc.cfg 
b/doc/examples/osmo-bsc/osmo-bsc.cfg
index 64c3abd..6ad5e59 100644
--- a/doc/examples/osmo-bsc/osmo-bsc.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc.cfg
@@ -12,7 +12,6 @@
  encryption a5 0
  neci 0
  paging any use tch 0
- rrlp mode none
  mm info 0
  handover 0
  handover window rxlev averaging 10
diff --git a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg 
b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
index 7697481..5031f2c 100644
--- a/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
+++ b/doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
@@ -11,7 +11,6 @@
  encryption a5 0
  neci 0
  paging any use tch 0
- rrlp mode none
  mm info 0
  handover 0
  handover window rxlev averaging 10
diff --git a/include/osmocom/bsc/Makefile.am b/include/osmocom/bsc/Makefile.am
index 1b86f9a..b067fc2 100644
--- a/include/osmocom/bsc/Makefile.am
+++ b/include/osmocom/bsc/Makefile.am
@@ -44,7 +44,6 @@
pcu_if.h \
pcuif_proto.h \
rest_octets.h \
-   rrlp.h \
rs232.h \
signal.h \
socket.h \
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 3268426..0f8bcb9 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -332,11 +332,6 @@
/* timer to expire old location updates */
struct osmo_timer_list subscr_expire_timer;
 
-   /* Radio Resource Location Protocol (TS 04.31) */
-   struct {
-   enum rrlp_mode mode;
-   } rrlp;
-
enum gsm_chan_t ctype_by_chreq[_NUM_CHREQ_T];
 
/* Use a TCH for handling requests of type paging any */
@@ -519,9 +514,6 @@
 
 enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
 const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
-
-enum rrlp_mode rrlp_mode_parse(const char *arg);
-const char *rrlp_mode_name(enum rrlp_mode mode);
 
 enum bts_gprs_mode bts_gprs_mode_parse(const char *arg, int *valid);
 const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
diff --git a/include/osmocom/bsc/gsm_data_shared.h 
b/include/osmocom/bsc/gsm_data_shared.h
index 9bbcabd..5d9b570 100644
--- a/include/osmocom/bsc/gsm_data_shared.h
+++ b/include/osmocom/bsc/gsm_data_shared.h
@@ -34,14 +34,6 @@
 
 struct osmo_bsc_sccp_con;
 
-/* RRLP mode of operation */
-enum rrlp_mode {
-   RRLP_MODE_NONE,
-   RRLP_MODE_MS_BASED,
-   RRLP_MODE_MS_PREF,
-   RRLP_MODE_ASS_PREF,
-};
-
 /* Channel Request reason */
 enum gsm_chreq_reason_t {
GSM_CHREQ_REASON_EMERG,
diff --git a/include/osmocom/bsc/rrlp.h b/include/osmocom/bsc/rrlp.h
deleted file mode 100644
index c89402a..000
--- a/include/osmocom/bsc/rrlp.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _RRLP_H
-#define _RRLP_H
-
-void on_dso_load_rrlp(void);
-
-#endif /* _RRLP_H */
-
diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 9500645..6fa8e04 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -180,8 +180,6 @@
VTY_NEWLINE);
vty_out(vty, "  Use TCH for Paging any: %d%s", net->pag_any_tch,
VTY_NEWLINE);
-   vty_out(vty, "  RRLP Mode: %s%s", rrlp_mode_name(net->rrlp.mode),
-   VTY_NEWLINE);
vty_out(vty, "  MM Info: %s%s", net->send_mm_info ? "On" : "Off",
VTY_NEWLINE);
vty_out(vty, "  Handover: %s%s", net->handover.active ? "On" : "Off",
@@ -817,8 +815,6 @@
vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE);
vty_out(vty, " neci %u%s", gsmnet->neci, VTY_NEWLINE);
vty_out(vty, " paging any use tch %d%s", gsmnet->pag_any_tch, 
VTY_NEWLINE);
-   vty_out(vty, " rrlp mode %s%s", rrlp_mode_name(gsmnet->rrlp.mode),
-   VTY_NEWLINE);
vty_out(vty, " mm info %u%s", gsmnet->send_mm_info, VTY_NEWLINE);
vty_out(vty, " handover %u%s", gsmnet->handover.active, VTY_NEWLINE);
vty_out(vty, " handover window rxlev averaging %u%s",
diff --git a/src/libcommon-cs/common_cs_vty.c b/src/libcommon-cs/common_cs_vty.c
index beb936b..8f6e4ef 100644
--- a/src/libcommon-cs/common_cs_vty.c
+++ b/src/libcommon-cs/common_cs_vty.c
@@ -133,22 +133,6 @@
r

[MERGED] osmo-bsc[master]: remove libosmo-sccp dependency for osmo-bsc

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

Change subject: remove libosmo-sccp dependency for osmo-bsc
..


remove libosmo-sccp dependency for osmo-bsc

libosmo-sccp is the old sccp-lite-focused SCCP implementation that we
used before libosmo-sigtran was created.  The new osmo-bsc in this
repository is using libosmo-sigtran and shouldn't be using parts of
libosmo-sccp anymore.

We only keep it around in configure.ac and Makefile.am for osmo-bsc_nat,
which is not even built in this repository anymore (or 'again yet'?)

Change-Id: I8f274be7d196cd7a5b1ec9ada949130fb06e984d
---
M include/osmocom/bsc/osmo_bsc.h
M src/libfilter/Makefile.am
M src/osmo-bsc/Makefile.am
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_main.c
M src/osmo-bsc/osmo_bsc_msc.c
M src/osmo-bsc/osmo_bsc_sigtran.c
M src/osmo-bsc/osmo_bsc_vty.c
M tests/bsc/Makefile.am
9 files changed, 6 insertions(+), 25 deletions(-)

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



diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 8a5cd30..0fd29b7 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -15,7 +15,6 @@
BSC_CON_NO_MEM,
 };
 
-struct sccp_connection;
 struct bsc_msc_data;
 struct bsc_msc_connection;
 
@@ -47,10 +46,7 @@
int send_ping;
 
/* SCCP connection realted */
-   struct sccp_connection *sccp;
struct bsc_msc_data *msc;
-   struct osmo_timer_list sccp_it_timeout;
-   struct osmo_timer_list sccp_cc_timeout;
 
struct llist_head sccp_queue;
unsigned int sccp_queue_size;
diff --git a/src/libfilter/Makefile.am b/src/libfilter/Makefile.am
index 6d3db0b..41a75bd 100644
--- a/src/libfilter/Makefile.am
+++ b/src/libfilter/Makefile.am
@@ -10,7 +10,6 @@
$(LIBOSMOGSM_CFLAGS) \
$(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
-   $(LIBOSMOSCCP_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
 
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am
index 4acbe56..7978852 100644
--- a/src/osmo-bsc/Makefile.am
+++ b/src/osmo-bsc/Makefile.am
@@ -11,7 +11,6 @@
$(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOCTRL_CFLAGS) \
$(LIBOSMONETIF_CFLAGS) \
-   $(LIBOSMOSCCP_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(LIBOSMOABIS_CFLAGS) \
$(LIBOSMOSIGTRAN_CFLAGS) \
@@ -45,7 +44,6 @@
$(top_builddir)/src/libbsc/libbsc.a \
$(top_builddir)/src/libcommon-cs/libcommon-cs.a \
$(top_builddir)/src/libcommon/libcommon.a \
-   $(LIBOSMOSCCP_LIBS) \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOVTY_LIBS) \
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index c388f5b..152b818 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -29,7 +29,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 #define return_when_not_connected(conn) \
@@ -296,13 +295,11 @@
resp = gsm0808_create_layer3(msg, network_code, country_code, lac, ci);
if (!resp) {
LOGP(DMSC, LOGL_DEBUG, "Failed to create layer3 message.\n");
-   sccp_connection_free(conn->sccp_con->sccp);
osmo_bsc_sigtran_del_conn(conn->sccp_con);
return BSC_API_CONN_POL_REJECT;
}
 
if (osmo_bsc_sigtran_open_conn(conn->sccp_con, resp) != 0) {
-   sccp_connection_free(conn->sccp_con->sccp);
osmo_bsc_sigtran_del_conn(conn->sccp_con);
msgb_free(resp);
return BSC_API_CONN_POL_REJECT;
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 829f207..e4c8fc5 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -43,7 +43,6 @@
 
 #include 
 
-#include 
 #include 
 
 #define _GNU_SOURCE
@@ -233,9 +232,6 @@
 
/* seed the PRNG */
srand(time(NULL));
-
-   /* initialize SCCP */
-   sccp_set_log_area(DSCCP);
 
/* Read the config */
rc = bsc_network_configure(config_file);
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 0e5777e..46be2e6 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -34,8 +34,6 @@
 
 #include 
 
-#include 
-
 #include 
 
 #include 
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index a18d4f3..7669b67 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -511,7 +510,8 @@
 
/* If unset, use default local SCCP address */
if (!msc->a.bsc_addr.presence)
-   osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, 
msc->a.sccp, SCCP_SSN_BSSAP);
+   osmo_sccp_local_addr_by_instance(&msc->a.bsc_addr, 
msc->a.sccp,
+ 

[PATCH] osmo-gsm-tester[master]: osmo-bsc.cfg.tmpl: Remove bogus VTY commands

2017-12-19 Thread Harald Welte

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

osmo-bsc.cfg.tmpl: Remove bogus VTY commands

There are plenty of VTY commands that were inherited from OsmoNITB,
but which make no sense in a BSC.  Upstream OsmoBSC has removed them in
change-ids Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38,
c499e5c62e9bef0db219e4658ffeb3292d6e6a5b and
8311a81bae85618302273c3f769275893161a7d7

Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22
---
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
1 file changed, 0 insertions(+), 5 deletions(-)


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

diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 95db16d..56ebe5a 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -29,13 +29,8 @@
 network
  network country code ${bsc.net.mcc}
  mobile network code ${bsc.net.mnc}
- short name ${bsc.net.short_name}
- long name ${bsc.net.long_name}
- location updating reject cause 13
  encryption ${bsc.net.encryption}
  neci 1
- rrlp mode none
- mm info 1
  handover 0
  handover window rxlev averaging 10
  handover window rxqual averaging 1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


osmo-gsm-tester[master]: osmo-bsc.cfg.tmpl: Remove bogus VTY commands

2017-12-19 Thread Harald Welte

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


[MERGED] osmo-gsm-tester[master]: osmo-bsc.cfg.tmpl: Remove bogus VTY commands

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

Change subject: osmo-bsc.cfg.tmpl: Remove bogus VTY commands
..


osmo-bsc.cfg.tmpl: Remove bogus VTY commands

There are plenty of VTY commands that were inherited from OsmoNITB,
but which make no sense in a BSC.  Upstream OsmoBSC has removed them in
change-ids Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38,
c499e5c62e9bef0db219e4658ffeb3292d6e6a5b and
8311a81bae85618302273c3f769275893161a7d7

Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22
---
M src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl 
b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 95db16d..56ebe5a 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -29,13 +29,8 @@
 network
  network country code ${bsc.net.mcc}
  mobile network code ${bsc.net.mnc}
- short name ${bsc.net.short_name}
- long name ${bsc.net.long_name}
- location updating reject cause 13
  encryption ${bsc.net.encryption}
  neci 1
- rrlp mode none
- mm info 1
  handover 0
  handover window rxlev averaging 10
  handover window rxqual averaging 1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 


[PATCH] osmo-bsc[master]: Remove unused struct osmo_bsc_sccp_con member sccp_queue_size

2017-12-19 Thread Harald Welte
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/5504

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

Remove unused struct osmo_bsc_sccp_con member sccp_queue_size

Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f
---
M include/osmocom/bsc/osmo_bsc.h
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/04/5504/4

diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 0fd29b7..13072c2 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -48,9 +48,6 @@
/* SCCP connection realted */
struct bsc_msc_data *msc;
 
-   struct llist_head sccp_queue;
-   unsigned int sccp_queue_size;
-
struct gsm_subscriber_connection *conn;
uint8_t new_subscriber;
 

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bsc[master]: osmo-bsc: Move user plane/voice related bits into sub-structure

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

Change subject: osmo-bsc: Move user plane/voice related bits into sub-structure
..


osmo-bsc: Move user plane/voice related bits into sub-structure

This clarifies which members of the struct are for what.

Change-Id: I618822e6f2d48adce25f9df5c25acbce7c858412
---
M include/osmocom/bsc/osmo_bsc.h
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_audio.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_mgcp.c
M src/osmo-bsc/osmo_bsc_sigtran.c
7 files changed, 43 insertions(+), 44 deletions(-)

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



diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 131007b..485c836 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -26,23 +26,23 @@
int ciphering_handled;
 
/* for audio handling */
-   uint16_t cic;
-   uint32_t rtp_ip;
-   int rtp_port;
+   struct {
+   uint16_t cic;
+   uint32_t rtp_ip;
+   int rtp_port;
+   /* RTP address of the remote end (assigned by MSC through 
assignment request) */
+   struct sockaddr_storage aoip_rtp_addr_remote;
 
-   /* RTP address of the remote end (assigned by MSC through assignment
-* request) */
-   struct sockaddr_storage aoip_rtp_addr_remote;
+   /* Local RTP address (reported back to the MSC by us with the
+* assignment complete message) */
+   struct sockaddr_storage aoip_rtp_addr_local;
 
-   /* Local RTP address (reported back to the MSC by us with the
-* assignment complete message) */
-   struct sockaddr_storage aoip_rtp_addr_local;
-
-   /* storage to keep states of the MGCP connection handler, the
-* handler is created when an assignment request is received
-* and is terminated when the assignment complete message is
-* sent */
-   struct mgcp_ctx *mgcp_ctx;
+   /* storage to keep states of the MGCP connection handler, the
+   * handler is created when an assignment request is received
+   * and is terminated when the assignment complete message is
+   * sent */
+   struct mgcp_ctx *mgcp_ctx;
+   } user_plane;
 
/* for advanced ping/pong */
int send_ping;
diff --git a/src/osmo-bsc/osmo_bsc_api.c b/src/osmo-bsc/osmo_bsc_api.c
index 152b818..a2a8630 100644
--- a/src/osmo-bsc/osmo_bsc_api.c
+++ b/src/osmo-bsc/osmo_bsc_api.c
@@ -435,7 +435,7 @@
struct msgb *resp;
return_when_not_connected(conn);
 
-   if (is_ipaccess_bts(conn->bts) && conn->sccp_con->rtp_ip) {
+   if (is_ipaccess_bts(conn->bts) && conn->sccp_con->user_plane.rtp_ip) {
/* NOTE: In a network that makes use of an IPA base station
 * and AoIP, we have to wait until the BTS reports its RTP
 * IP/Port combination back to BSC via RSL. Unfortunately, the
diff --git a/src/osmo-bsc/osmo_bsc_audio.c b/src/osmo-bsc/osmo_bsc_audio.c
index 0c11b85..82367f0 100644
--- a/src/osmo-bsc/osmo_bsc_audio.c
+++ b/src/osmo-bsc/osmo_bsc_audio.c
@@ -57,17 +57,17 @@
 
/* we can ask it to connect now */
LOGP(DMSC, LOGL_DEBUG, "Connecting BTS to port: %d conn: %d\n",
-con->sccp_con->rtp_port, lchan->abis_ip.conn_id);
+con->sccp_con->user_plane.rtp_port, 
lchan->abis_ip.conn_id);
 
/* If AoIP is in use, the rtp_ip, which has been communicated
 * via the A interface as connect_ip */
-   if(con->sccp_con->rtp_ip)
-   rtp_ip = con->sccp_con->rtp_ip;
+   if(con->sccp_con->user_plane.rtp_ip)
+   rtp_ip = con->sccp_con->user_plane.rtp_ip;
else
rtp_ip = ntohl(INADDR_ANY);
 
rc = rsl_ipacc_mdcx(lchan, rtp_ip,
-   con->sccp_con->rtp_port,
+   con->sccp_con->user_plane.rtp_port,
lchan->abis_ip.rtp_payload2);
if (rc < 0) {
LOGP(DMSC, LOGL_ERROR, "Failed to send MDCX: %d\n", rc);
@@ -84,13 +84,13 @@
 * inform the logic that controls the MGW about the new
 * connection info */
LOGP(DMSC, LOGL_INFO,"RTP connection handover 
initiated...\n");
-   mgcp_handover(con->sccp_con->mgcp_ctx, con->ho_lchan);
-   } else if (is_ipaccess_bts(con->bts) && con->sccp_con->rtp_ip) {
+   mgcp_handover(con->sccp_con->user_plane.mgcp_ctx, 
con->ho_lchan);
+   } else if (is_ipaccess_bts(con->bts) && 
con->sccp_con->user_plane.r

[MERGED] osmo-bsc[master]: remove unused 'lac' member of 'struct gsm_subscriber_connect...

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

Change subject: remove unused 'lac' member of 'struct gsm_subscriber_connection'
..


remove unused 'lac' member of 'struct gsm_subscriber_connection'

This field was used in write-pnly mode, i.e. set but never read.

Change-Id: I319945538fd3e3bc5cf3b9d82533641cb8ba5256
---
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_api.c
2 files changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 2e97055..3cc3794 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -96,8 +96,6 @@
 
/* buffer/cache for classmark of the ME of the subscriber */
struct gsm_classmark classmark;
-
-   uint16_t lac;
 };
 
 
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 6ff1688..9ec51af 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -261,7 +261,6 @@
conn->network = net;
conn->lchan = lchan;
conn->bts = lchan->ts->trx->bts;
-   conn->lac = conn->bts->location_area_code;
lchan->conn = conn;
llist_add_tail(&conn->entry, &net->subscr_conns);
return conn;

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

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


osmo-bsc[master]: Remove unused struct osmo_bsc_sccp_con member sccp_queue_size

2017-12-19 Thread Harald Welte

Patch Set 4: Code-Review+2

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

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


[MERGED] osmo-bsc[master]: gsm_data.h: Document all fields of gsm_subscriber_connection

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

Change subject: gsm_data.h: Document all fields of gsm_subscriber_connection
..


gsm_data.h: Document all fields of gsm_subscriber_connection

Change-Id: I429fe7817f075d0794645d37f5ea11b104102ba0
---
M include/osmocom/bsc/gsm_data.h
1 file changed, 14 insertions(+), 8 deletions(-)

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



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 1cedef0..2e97055 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -75,20 +75,26 @@
/* libbsc subscriber information (if available) */
struct bsc_subscr *bsub;
 
-   /* bsc structures */
-   struct osmo_bsc_sccp_con *sccp_con; /* BSC */
+   /* SCCP connection associatd with this subscriber_connection */
+   struct osmo_bsc_sccp_con *sccp_con;
 
/* back pointers */
struct gsm_network *network;
 
-   struct gsm_lchan *lchan; /* BSC */
-   struct gsm_lchan *ho_lchan; /* BSC */
-   struct gsm_bts *bts; /* BSC */
+   /* the primary / currently active lchan to the BTS/subscriber */
+   struct gsm_lchan *lchan;
+   /* the future/allocated but not yet used lchan during HANDOVER */
+   struct gsm_lchan *ho_lchan;
+   /* a short-hand pointer to the BTS currently serving the subscriber,
+* points to gsm_subscriber_connection.lchan->ts->trx->bts */
+   struct gsm_bts *bts;
 
-   /* for assignment handling */
-   struct osmo_timer_list T10; /* BSC */
-   struct gsm_lchan *secondary_lchan; /* BSC */
+   /* timer for assignment handling */
+   struct osmo_timer_list T10;
+   /* the future allocated but not yet used lchan during ASSIGNMENT */
+   struct gsm_lchan *secondary_lchan;
 
+   /* buffer/cache for classmark of the ME of the subscriber */
struct gsm_classmark classmark;
 
uint16_t lac;

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

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


[MERGED] osmo-bsc[master]: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'

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

Change subject: osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'
..


osmo_bsc.h: document every field in 'struct osmo_bsc_sccp_con'

Change-Id: I674ed61a22fad5cc09c45128dbc73474893aefb6
---
M include/osmocom/bsc/osmo_bsc.h
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 13072c2..131007b 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -19,8 +19,10 @@
 struct bsc_msc_connection;
 
 struct osmo_bsc_sccp_con {
+   /* list_head anchoring us to gsm_network.subscr_conns */
struct llist_head entry;
 
+   /* flag to prevent multiple simultaneous ciphering commands */
int ciphering_handled;
 
/* for audio handling */
@@ -48,9 +50,12 @@
/* SCCP connection realted */
struct bsc_msc_data *msc;
 
+   /* back-pointer to subscriber connection */
struct gsm_subscriber_connection *conn;
+   /* state related to welcome USSD */
uint8_t new_subscriber;
 
+   /* state related to osmo_bsc_filter.c */
struct bsc_filter_state filter_state;
 
/* Sigtran connection ID */

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

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


[MERGED] osmo-bsc[master]: Remove unused struct osmo_bsc_sccp_con member sccp_queue_size

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

Change subject: Remove unused struct osmo_bsc_sccp_con member sccp_queue_size
..


Remove unused struct osmo_bsc_sccp_con member sccp_queue_size

Change-Id: Ibc4b8f3776c35df7e81252efb78ec740a371de7f
---
M include/osmocom/bsc/osmo_bsc.h
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/include/osmocom/bsc/osmo_bsc.h b/include/osmocom/bsc/osmo_bsc.h
index 0fd29b7..13072c2 100644
--- a/include/osmocom/bsc/osmo_bsc.h
+++ b/include/osmocom/bsc/osmo_bsc.h
@@ -48,9 +48,6 @@
/* SCCP connection realted */
struct bsc_msc_data *msc;
 
-   struct llist_head sccp_queue;
-   unsigned int sccp_queue_size;
-
struct gsm_subscriber_connection *conn;
uint8_t new_subscriber;
 

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

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/i586

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/i586

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  138s] | #define HAVE_STRINGS_H 1
[  138s] | #define HAVE_INTTYPES_H 1
[  138s] | #define HAVE_STDINT_H 1
[  138s] | #define HAVE_UNISTD_H 1
[  138s] | #define HAVE_DLFCN_H 1
[  138s] | #define LT_OBJDIR ".libs/"
[  138s] | #define BUILD_SMPP 1
[  138s] | #define STDC_HEADERS 1
[  138s] | #define HAVE_DBI_DBD_H 1
[  138s] | #define HAVE_PCAP_PCAP_H 1
[  138s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  138s] | 
[  138s] | configure: exit 0
[  138s] 
[  138s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  138s] make[1]: *** [override_dh_auto_test] Error 1
[  138s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  138s] debian/rules:13: recipe for target 'build' failed
[  138s] make: *** [build] Error 2
[  138s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  138s] 
[  138s] lamb02 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:03:28 UTC 2017.
[  138s] 
[  138s] ### VM INTERACTION START ###
[  141s] [  132.633609] reboot: Power down
[  141s] ### VM INTERACTION END ###
[  141s] 
[  141s] lamb02 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:03:31 UTC 2017.
[  141s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.10/i586

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.10/i586

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.10/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  173s] | #define HAVE_STRINGS_H 1
[  173s] | #define HAVE_INTTYPES_H 1
[  173s] | #define HAVE_STDINT_H 1
[  173s] | #define HAVE_UNISTD_H 1
[  173s] | #define HAVE_DLFCN_H 1
[  173s] | #define LT_OBJDIR ".libs/"
[  173s] | #define BUILD_SMPP 1
[  173s] | #define STDC_HEADERS 1
[  173s] | #define HAVE_DBI_DBD_H 1
[  173s] | #define HAVE_PCAP_PCAP_H 1
[  173s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  173s] | 
[  173s] | configure: exit 0
[  173s] 
[  173s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  173s] make[1]: *** [override_dh_auto_test] Error 1
[  173s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  173s] debian/rules:13: recipe for target 'build' failed
[  173s] make: *** [build] Error 2
[  173s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  173s] 
[  173s] build30 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:05:02 UTC 2017.
[  173s] 
[  173s] ### VM INTERACTION START ###
[  176s] [  162.221780] reboot: Power down
[  177s] ### VM INTERACTION END ###
[  177s] 
[  177s] build30 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:05:07 UTC 2017.
[  177s] 

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


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/i586

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/i586

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  150s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  150s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  150s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  150s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  150s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  150s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  150s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  150s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  150s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  150s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  150s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  150s] -Done.
[  150s] ./testsuite.at:7: exit code was 139, expected 0
[  150s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  150s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  150s] make[1]: *** [override_dh_auto_test] Error 1
[  150s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  150s] debian/rules:13: recipe for target 'build' failed
[  150s] make: *** [build] Error 2
[  150s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  150s] 
[  150s] lamb06 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:05:37 UTC 2017.
[  150s] 
[  150s] ### VM INTERACTION START ###
[  153s] [  144.611310] reboot: Power down
[  153s] ### VM INTERACTION END ###
[  153s] 
[  153s] lamb06 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:05:41 UTC 2017.
[  153s] 

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


Build failure of network:osmocom:nightly/openbsc in Debian_8.0/x86_64

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_8.0/x86_64

Package network:osmocom:nightly/openbsc failed to build in Debian_8.0/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  136s] ./testsuite.at:7: exit code was 139, expected 0
[  136s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  136s] # -*- compilation -*-
[  136s] 5. testsuite.at:31: testing channel ...
[  136s] ./testsuite.at:34: $abs_top_builddir/tests/channel/channel_test
[  136s] stderr:
[  136s] <001e> rate_ctr.c:195 counter group 'msc' already exists for index 0
[  136s] 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/test-source:
 line 25: 22819 Segmentation fault  
$abs_top_builddir/tests/channel/channel_test
[  136s] --- expout 2017-12-19 20:06:50.123997606 +
[  136s] +++ 
/usr/src/packages/BUILD/openbsc/tests/testsuite.dir/at-groups/5/stdout 
2017-12-19 20:06:50.123997606 +
[  136s] @@ -1,4 +0,0 @@
[  136s] -Testing the gsm_subscriber chan logic
[  136s] -Reached, didn't crash, test passed
[  136s] -Testing subslot numbers for pchan types
[  136s] -Testing the lchan printing: (bts=45,trx=0,ts=3,ss=4) 
(bts=45,trx=1,ts=3,ss=4)
[  136s] ./testsuite.at:34: exit code was 139, expected 0
[  136s] 5. testsuite.at:31: 5. channel (testsuite.at:31): FAILED 
(testsuite.at:34)
[  136s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  136s] make[1]: *** [override_dh_auto_test] Error 1
[  136s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  136s] debian/rules:13: recipe for target 'build' failed
[  136s] make: *** [build] Error 2
[  136s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  136s] 
[  136s] wildcard3 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:06:50 UTC 2017.
[  136s] 
[  136s] ### VM INTERACTION START ###
[  137s] Powering off.
[  137s] [  124.665690] reboot: Power down

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.10/x86_64

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.10/x86_64

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[   89s] | #define HAVE_STRINGS_H 1
[   89s] | #define HAVE_INTTYPES_H 1
[   89s] | #define HAVE_STDINT_H 1
[   89s] | #define HAVE_UNISTD_H 1
[   89s] | #define HAVE_DLFCN_H 1
[   89s] | #define LT_OBJDIR ".libs/"
[   89s] | #define BUILD_SMPP 1
[   89s] | #define STDC_HEADERS 1
[   89s] | #define HAVE_DBI_DBD_H 1
[   89s] | #define HAVE_PCAP_PCAP_H 1
[   89s] | #define HAVE_TM_GMTOFF_IN_TM 1
[   89s] | 
[   89s] | configure: exit 0
[   89s] 
[   89s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[   89s] make[1]: *** [override_dh_auto_test] Error 1
[   89s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[   89s] debian/rules:13: recipe for target 'build' failed
[   89s] make: *** [build] Error 2
[   89s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[   89s] 
[   89s] build84 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:06:52 UTC 2017.
[   89s] 
[   89s] ### VM INTERACTION START ###
[   92s] [   86.716305] reboot: Power down
[   92s] ### VM INTERACTION END ###
[   92s] 
[   92s] build84 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:06:55 UTC 2017.
[   92s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.04/x86_64

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.04/x86_64

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  154s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  154s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  154s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  154s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  154s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  154s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  154s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  154s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  154s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  154s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  154s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  154s] -Done.
[  154s] ./testsuite.at:7: exit code was 139, expected 0
[  154s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  154s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  154s] make[1]: *** [override_dh_auto_test] Error 1
[  154s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  154s] debian/rules:13: recipe for target 'build' failed
[  154s] make: *** [build] Error 2
[  154s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  154s] 
[  154s] lamb27 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:08:16 UTC 2017.
[  154s] 
[  154s] ### VM INTERACTION START ###
[  158s] [  150.072232] reboot: Power down
[  158s] ### VM INTERACTION END ###
[  158s] 
[  158s] lamb27 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:08:20 UTC 2017.
[  158s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.10/x86_64

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.10/x86_64

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  141s] -generated valid SI2quater [02/05]: [23] 59 06 07 44 a0 04 86 59 83 c2 
ec 20 ff 61 08 19 08 41 b7 2e ca c1 2b 
[  141s] -generated valid SI2quater [03/05]: [23] 59 06 07 46 a0 04 86 59 84 21 
54 21 4f 61 0a 99 08 55 b7 2e ca c1 2b 
[  141s] -generated valid SI2quater [04/05]: [23] 59 06 07 48 a0 04 86 59 84 2b 
54 21 27 61 09 59 08 4b b7 2e ca c1 2b 
[  141s] -generated valid SI2quater [05/05]: [23] 59 06 07 4a a0 04 86 59 84 26 
53 97 65 60 2b 2b 2b 2b 2b 2b 2b 2b 2b 
[  141s] -Testing if BA-IND is set as expected in SI2xxx and SI5xxx
[  141s] -SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  141s] -SI2bis: 59 06 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 
[  141s] -SI2ter: 59 06 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  141s] -SI5: 06 1d 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  141s] -SI5bis: 06 05 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  141s] -SI5ter: 06 06 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
[  141s] -Done.
[  141s] ./testsuite.at:7: exit code was 139, expected 0
[  141s] 1. testsuite.at:4: 1. gsm0408 (testsuite.at:4): FAILED (testsuite.at:7)
[  141s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  141s] make[1]: *** [override_dh_auto_test] Error 1
[  141s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  141s] debian/rules:13: recipe for target 'build' failed
[  141s] make: *** [build] Error 2
[  141s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  141s] 
[  141s] lamb53 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:08:01 UTC 2017.
[  141s] 
[  141s] ### VM INTERACTION START ###
[  144s] [  136.852633] reboot: Power down
[  144s] ### VM INTERACTION END ###
[  144s] 
[  144s] lamb53 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:08:06 UTC 2017.
[  144s] 

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


Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/x86_64

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/x86_64

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  169s] | #define HAVE_STRINGS_H 1
[  169s] | #define HAVE_INTTYPES_H 1
[  169s] | #define HAVE_STDINT_H 1
[  169s] | #define HAVE_UNISTD_H 1
[  169s] | #define HAVE_DLFCN_H 1
[  169s] | #define LT_OBJDIR ".libs/"
[  169s] | #define BUILD_SMPP 1
[  169s] | #define STDC_HEADERS 1
[  169s] | #define HAVE_DBI_DBD_H 1
[  169s] | #define HAVE_PCAP_PCAP_H 1
[  169s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  169s] | 
[  169s] | configure: exit 0
[  169s] 
[  169s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  169s] make[1]: *** [override_dh_auto_test] Error 1
[  169s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  169s] debian/rules:13: recipe for target 'build' failed
[  169s] make: *** [build] Error 2
[  169s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  169s] 
[  169s] cloud121 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:09:25 UTC 2017.
[  169s] 
[  169s] ### VM INTERACTION START ###
[  173s] [  156.925764] reboot: Power down
[  175s] ### VM INTERACTION END ###
[  175s] 
[  175s] cloud121 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:09:32 UTC 2017.
[  175s] 

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


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/x86_64

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/x86_64

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  143s] | #define HAVE_STRINGS_H 1
[  143s] | #define HAVE_INTTYPES_H 1
[  143s] | #define HAVE_STDINT_H 1
[  143s] | #define HAVE_UNISTD_H 1
[  143s] | #define HAVE_DLFCN_H 1
[  143s] | #define LT_OBJDIR ".libs/"
[  143s] | #define BUILD_SMPP 1
[  143s] | #define STDC_HEADERS 1
[  143s] | #define HAVE_DBI_DBD_H 1
[  143s] | #define HAVE_PCAP_PCAP_H 1
[  143s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  143s] | 
[  143s] | configure: exit 0
[  143s] 
[  143s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  143s] make[1]: *** [override_dh_auto_test] Error 1
[  143s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  143s] debian/rules:13: recipe for target 'build' failed
[  143s] make: *** [build] Error 2
[  143s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  143s] 
[  143s] lamb60 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:13:55 UTC 2017.
[  143s] 
[  143s] ### VM INTERACTION START ###
[  146s] [  138.219926] reboot: Power down
[  146s] ### VM INTERACTION END ###
[  146s] 
[  146s] lamb60 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
20:13:59 UTC 2017.
[  146s] 

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


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64

2017-12-19 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[ 1046s] | configure:3076: checking whether make sets $(MAKE)
[ 1046s] | configure:3098: result: yes
[ 1046s] | configure:3155: checking for gcc
[ 1046s] | configure:3171: found /usr/bin/gcc
[ 1046s] | configure:3182: result: gcc
[ 1046s] | configure:3411: checking for C compiler version
[ 1046s] | configure:3420: gcc --version >&5
[ 1046s] | gcc (Debian 6.3.0-18) 6.3.0 20170516
[ 1046s] | Copyright (C) 2016 Free Software Foundation, Inc.
[ 1046s] | This is free software; see the source for copying conditions.  There 
is NO
[ 1046s] | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.
[ 1046s] | 
[ 1046s] | configure:3431: $? = 0
[ 1046s] | configure:3420: gcc -v >&5
[ 1046s] | Using built-in specs.
[ 1046s] | COLLECT_GCC=gcc
[ 1046s] | COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/6/lto-wrapper
[ 1046s] | Target: aarch64-linux-gnu
[ 1046s] | Configured with: ../src/configure -v --with-pkgversion='Debian 
6.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs 
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr 
--program-suffix=-6 --program-prefix=aarch64-linux-gnu- --enable-shared 
--enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext 
--enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ 
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes 
--with-default-libstdcxx-abi=new --enable-gnu-unique-object 
--disable-libquadmath --enable-plugin --enable-default-pie --with-system-zlib 
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo 
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-arm64/jre --enable-java-home 
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-arm64 
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-arm64 
--with-arch-directory=aarch64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar 
--enable-multiarch --enable-fix-cortex-a53-843419 --enable-checking=release 
--build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
[ 1046s] | Thread model: posix
[ 1046s] | gcc version 6.3.0 20170516 (Debian 6.3.0-18) 
[ 1046s] | configure:3431: $? = 0
[ 1046s] | configure:3420: gcc -V >&5
[ 1048s] | gcc: error: unrecognized command line option[  989.967956] sysrq: 
SysRq : Power Off
[ 1048s] [  989.982274] reboot: Power down
[ 1049s] ### VM INTERACTION END ###
[ 1049s] 
[ 1049s] obs-arm-2 failed "build openbsc_1.0.0.20171219.dsc" at Tue Dec 19 
21:24:50 UTC 2017.
[ 1049s] 

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


[PATCH] osmo-ci[master]: jobs: master: fix: libosmoabis should trigger osmo-hlr

2017-12-19 Thread Neels Hofmeyr

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

jobs: master: fix: libosmoabis should trigger osmo-hlr

Change-Id: I9a122cee4fa98115140e4a34f623958697affed2
---
M jobs/master-builds.yml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml
index 78d373b..3e2e5fb 100644
--- a/jobs/master-builds.yml
+++ b/jobs/master-builds.yml
@@ -35,7 +35,7 @@
   - libasn1c
   - libgtpnl
   - libosmo-abis:
-  trigger: master-openbsc, master-libosmo-netif
+  trigger: master-openbsc, master-libosmo-netif, master-osmo-hlr
 
   - libosmo-dsp:
   cmd: >

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

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


[MERGED] osmo-ci[master]: jobs: master: fix: libosmoabis should trigger osmo-hlr

2017-12-19 Thread Neels Hofmeyr
Neels Hofmeyr has submitted this change and it was merged.

Change subject: jobs: master: fix: libosmoabis should trigger osmo-hlr
..


jobs: master: fix: libosmoabis should trigger osmo-hlr

Change-Id: I9a122cee4fa98115140e4a34f623958697affed2
---
M jobs/master-builds.yml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved; Verified



diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml
index 78d373b..3e2e5fb 100644
--- a/jobs/master-builds.yml
+++ b/jobs/master-builds.yml
@@ -35,7 +35,7 @@
   - libasn1c
   - libgtpnl
   - libosmo-abis:
-  trigger: master-openbsc, master-libosmo-netif
+  trigger: master-openbsc, master-libosmo-netif, master-osmo-hlr
 
   - libosmo-dsp:
   cmd: >

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a122cee4fa98115140e4a34f623958697affed2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 


osmo-ci[master]: jobs: master: fix: libosmoabis should trigger osmo-hlr

2017-12-19 Thread Neels Hofmeyr

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9a122cee4fa98115140e4a34f623958697affed2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


  1   2   >