[M] Change in pysim[master]: sysmocom_sja2: Add some de/encode test vectors

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34949?usp=email )


Change subject: sysmocom_sja2: Add some de/encode test vectors
..

sysmocom_sja2: Add some de/encode test vectors

This increases test coverage and also shows where we so far only
have decoders but no encoders yet

Change-Id: I7932bab7c81a2314c1b9477f50b82a46f24d074e
---
M pySim/sysmocom_sja2.py
1 file changed, 56 insertions(+), 19 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/34949/1

diff --git a/pySim/sysmocom_sja2.py b/pySim/sysmocom_sja2.py
index bfd0ff5..bd9e8a8 100644
--- a/pySim/sysmocom_sja2.py
+++ b/pySim/sysmocom_sja2.py
@@ -70,18 +70,20 @@


 class EF_MILENAGE_CFG(TransparentEF):
+_test_de_encode = [
+( 
'4000204061000200040008',
+  {"r1": 64, "r2": 0, "r3": 32, "r4": 64, "r5": 96, "c1": 
"", "c2":
+   "0001", "c3": 
"0002", "c4":
+   "0004", "c5": 
"0008"} ),
+  ]
 def __init__(self, fid='6f21', name='EF.MILENAGE_CFG', desc='Milenage 
connfiguration'):
 super().__init__(fid, name=name, desc=desc)
-
-def _decode_bin(self, raw_bin_data):
-u = unpack('!B16s16s16s16s16s', raw_bin_data)
-return {'r1': u[0], 'r2': u[1], 'r3': u[2], 'r4': u[3], 'r5': u[4],
-'c1': u[5].hex(),
-'c2': u[6].hex(),
-'c3': u[7].hex(),
-'c4': u[8].hex(),
-'c5': u[9].hex(),
-}
+self._construct = Struct('r1'/Int8ub, 'r2'/Int8ub, 'r3'/Int8ub, 
'r4'/Int8ub, 'r5'/Int8ub,
+ 'c1'/HexAdapter(Bytes(16)),
+ 'c2'/HexAdapter(Bytes(16)),
+ 'c3'/HexAdapter(Bytes(16)),
+ 'c4'/HexAdapter(Bytes(16)),
+ 'c5'/HexAdapter(Bytes(16)))


 class EF_0348_KEY(LinFixedEF):
@@ -99,12 +101,14 @@


 class EF_0348_COUNT(LinFixedEF):
+_test_de_encode = [
+( 'fe0100', {"sec_domain": 254, "key_set_version": 1, 
"counter": "00"} ),
+  ]
 def __init__(self, fid='6f23', name='EF.0348_COUNT', desc='TS 03.48 OTA 
Counters'):
 super().__init__(fid, name=name, desc=desc, rec_len=(7, 7))
-
-def _decode_record_bin(self, raw_bin_data, **kwargs):
-u = unpack('!BB5s', raw_bin_data)
-return {'sec_domain': u[0], 'key_set_version': u[1], 'counter': u[2]}
+self._construct = Struct('sec_domain'/Int8ub,
+ 'key_set_version'/Int8ub,
+ 'counter'/HexAdapter(Bytes(5)))


 class EF_SIM_AUTH_COUNTER(TransparentEF):
@@ -114,13 +118,15 @@


 class EF_GP_COUNT(LinFixedEF):
+_test_de_encode = [
+( '007000', {"sec_domain": 0, "key_set_version": 112, "counter": 
0, "rfu": 0} ),
+  ]
 def __init__(self, fid='6f26', name='EF.GP_COUNT', desc='GP SCP02 
Counters'):
 super().__init__(fid, name=name, desc=desc, rec_len=(5, 5))
-
-def _decode_record_bin(self, raw_bin_data, **kwargs):
-u = unpack('!BBHB', raw_bin_data)
-return {'sec_domain': u[0], 'key_set_version': u[1], 'counter': u[2], 
'rfu': u[3]}
-
+self._construct = Struct('sec_domain'/Int8ub,
+ 'key_set_version'/Int8ub,
+ 'counter'/Int16ub,
+ 'rfu'/Int8ub)

 class EF_GP_DIV_DATA(LinFixedEF):
 def __init__(self, fid='6f27', name='EF.GP_DIV_DATA', desc='GP SCP02 key 
diversification data'):
@@ -132,6 +138,11 @@


 class EF_SIM_AUTH_KEY(TransparentEF):
+_test_de_encode = [
+( '14000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f',
+  {"cfg": {"use_sres_deriv_func_2": 0, "use_opc_instead_of_op": 1, 
"algorithm": "milenage"}, "key":
+   "000102030405060708090a0b0c0d0e0f", "op_opc": 
"101112131415161718191a1b1c1d1e1f"} ),
+  ]
 def __init__(self, fid='6f20', name='EF.SIM_AUTH_KEY'):
 super().__init__(fid, name=name, desc='USIM authentication key')
 CfgByte = BitStruct(Padding(2),
@@ -168,6 +179,14 @@


 class EF_USIM_SQN(TransparentEF):
+_test_de_encode = [
+( 

[S] Change in pysim[master]: pySim-shell: Reject any non-decimal PIN values

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34948?usp=email )


Change subject: pySim-shell: Reject any non-decimal PIN values
..

pySim-shell: Reject any non-decimal PIN values

Don't even send any non-decimal PIN values to the card, but reject
them when parsing the command arguments.

Change-Id: Icec1698851471af7f76f20201dcdcfcd48ddf365
---
M pySim-shell.py
M pySim/utils.py
2 files changed, 27 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/48/34948/1

diff --git a/pySim-shell.py b/pySim-shell.py
index 306dd40..0c559f9 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -53,7 +53,7 @@
 from pySim.cards import card_detect, SimCardBase, UiccCardBase
 from pySim.utils import h2b, b2h, i2h, swap_nibbles, rpad, JsonEncoder, 
bertlv_parse_one, sw_match
 from pySim.utils import sanitize_pin_adm, tabulate_str_list, 
boxed_heading_str, Hexstr, dec_iccid
-from pySim.utils import is_hexstr_or_decimal, is_hexstr
+from pySim.utils import is_hexstr_or_decimal, is_hexstr, is_decimal
 from pySim.card_handler import CardHandler, CardHandlerAuto

 from pySim.filesystem import CardDF, CardADF, CardModel, CardApplication
@@ -864,7 +864,7 @@
 verify_chv_parser.add_argument(
 '--pin-nr', type=int, default=1, help='PIN Number, 1=PIN1, 2=PIN2 or 
custom value (decimal)')
 verify_chv_parser.add_argument(
-'pin_code', type=str, help='PIN code digits, \"PIN1\" or \"PIN2\" to 
get PIN code from external data source')
+'pin_code', type=is_decimal, help='PIN code digits, \"PIN1\" or 
\"PIN2\" to get PIN code from external data source')

 @cmd2.with_argparser(verify_chv_parser)
 def do_verify_chv(self, opts):
@@ -879,9 +879,9 @@
 unblock_chv_parser.add_argument(
 '--pin-nr', type=int, default=1, help='PUK Number, 1=PIN1, 2=PIN2 or 
custom value (decimal)')
 unblock_chv_parser.add_argument(
-'puk_code', type=str, help='PUK code digits \"PUK1\" or \"PUK2\" to 
get PUK code from external data source')
+'puk_code', type=is_decimal, help='PUK code digits \"PUK1\" or 
\"PUK2\" to get PUK code from external data source')
 unblock_chv_parser.add_argument(
-'new_pin_code', type=str, help='PIN code digits \"PIN1\" or \"PIN2\" 
to get PIN code from external data source')
+'new_pin_code', type=is_decimal, help='PIN code digits \"PIN1\" or 
\"PIN2\" to get PIN code from external data source')

 @cmd2.with_argparser(unblock_chv_parser)
 def do_unblock_chv(self, opts):
@@ -896,9 +896,9 @@
 change_chv_parser.add_argument(
 '--pin-nr', type=int, default=1, help='PUK Number, 1=PIN1, 2=PIN2 or 
custom value (decimal)')
 change_chv_parser.add_argument(
-'pin_code', type=str, help='PIN code digits \"PIN1\" or \"PIN2\" to 
get PIN code from external data source')
+'pin_code', type=is_decimal, help='PIN code digits \"PIN1\" or 
\"PIN2\" to get PIN code from external data source')
 change_chv_parser.add_argument(
-'new_pin_code', type=str, help='PIN code digits \"PIN1\" or \"PIN2\" 
to get PIN code from external data source')
+'new_pin_code', type=is_decimal, help='PIN code digits \"PIN1\" or 
\"PIN2\" to get PIN code from external data source')

 @cmd2.with_argparser(change_chv_parser)
 def do_change_chv(self, opts):
@@ -913,7 +913,7 @@
 disable_chv_parser.add_argument(
 '--pin-nr', type=int, default=1, help='PIN Number, 1=PIN1, 2=PIN2 or 
custom value (decimal)')
 disable_chv_parser.add_argument(
-'pin_code', type=str, help='PIN code digits, \"PIN1\" or \"PIN2\" to 
get PIN code from external data source')
+'pin_code', type=is_decimal, help='PIN code digits, \"PIN1\" or 
\"PIN2\" to get PIN code from external data source')

 @cmd2.with_argparser(disable_chv_parser)
 def do_disable_chv(self, opts):
@@ -926,7 +926,7 @@
 enable_chv_parser.add_argument(
 '--pin-nr', type=int, default=1, help='PIN Number, 1=PIN1, 2=PIN2 or 
custom value (decimal)')
 enable_chv_parser.add_argument(
-'pin_code', type=str, help='PIN code digits, \"PIN1\" or \"PIN2\" to 
get PIN code from external data source')
+'pin_code', type=is_decimal, help='PIN code digits, \"PIN1\" or 
\"PIN2\" to get PIN code from external data source')

 @cmd2.with_argparser(enable_chv_parser)
 def do_enable_chv(self, opts):
diff --git a/pySim/utils.py b/pySim/utils.py
index ea1c9e6..44800fb 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -1487,3 +1487,10 @@
 if len(instr) & 1:
 raise ValueError('Input has un-even number of hex digits')
 return instr
+
+def is_decimal(instr: str) -> str:
+"""Method that can be used as 'type' in argparse.add_argument() to 
validate the value consists of
+an even sequence of decimal digits only."""
+if not instr.isdecimal():
+raise 

[S] Change in pysim[master]: pySim-shell: Improved argument validation for verify_adm argument

2023-11-01 Thread laforge
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/pysim/+/34945?usp=email

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

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: pySim-shell: Improved argument validation for verify_adm 
argument
..

pySim-shell: Improved argument validation for verify_adm argument

Let's make sure we don't even bother to ask the card to verify
anything as ADM1 pin which is not either a sequence of decimal digits
or an even number of hex digits (even number of bytes).

Change-Id: I4a193a3cf63462fad73d145ab1481070ddf767ca
---
M pySim-shell.py
M pySim/utils.py
2 files changed, 26 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/45/34945/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4a193a3cf63462fad73d145ab1481070ddf767ca
Gerrit-Change-Number: 34945
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


[S] Change in pysim[master]: pySim-shell: Validate that argument to 'apdu' command is proper hexstr

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34946?usp=email )


Change subject: pySim-shell: Validate that argument to 'apdu' command is proper 
hexstr
..

pySim-shell: Validate that argument to 'apdu' command is proper hexstr

Let's not even send anything to the card if it's not an even number
of hexadecimal digits

Change-Id: I58465244101cc1a976e5a17af2aceea1cf9f9b54
---
M pySim-shell.py
M pySim/utils.py
2 files changed, 23 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/46/34946/1

diff --git a/pySim-shell.py b/pySim-shell.py
index c2bb15c..d9c9f8c 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -53,7 +53,7 @@
 from pySim.cards import card_detect, SimCardBase, UiccCardBase
 from pySim.utils import h2b, b2h, i2h, swap_nibbles, rpad, JsonEncoder, 
bertlv_parse_one, sw_match
 from pySim.utils import sanitize_pin_adm, tabulate_str_list, 
boxed_heading_str, Hexstr, dec_iccid
-from pySim.utils import is_hexstr_or_decimal
+from pySim.utils import is_hexstr_or_decimal, is_hexstr
 from pySim.card_handler import CardHandler, CardHandlerAuto

 from pySim.filesystem import CardDF, CardADF, CardModel, CardApplication
@@ -322,7 +322,7 @@
 self.equip(card, rs)

 apdu_cmd_parser = argparse.ArgumentParser()
-apdu_cmd_parser.add_argument('APDU', type=str, help='APDU as hex string')
+apdu_cmd_parser.add_argument('APDU', type=is_hexstr, help='APDU as hex 
string')
 apdu_cmd_parser.add_argument('--expect-sw', help='expect a specified 
status word', type=str, default=None)

 @cmd2.with_argparser(apdu_cmd_parser)
diff --git a/pySim/utils.py b/pySim/utils.py
index 92bf70f..ea1c9e6 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -1478,3 +1478,12 @@
 if len(instr) & 1:
 raise ValueError('Input has un-even number of hex digits')
 return instr
+
+def is_hexstr(instr: str) -> str:
+"""Method that can be used as 'type' in argparse.add_argument() to 
validate the value consists of
+an even sequence of hexadecimal digits only."""
+if not all(c in string.hexdigits for c in instr):
+raise ValueError('Input must be hexadecimal')
+if len(instr) & 1:
+raise ValueError('Input has un-even number of hex digits')
+return instr

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34946?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I58465244101cc1a976e5a17af2aceea1cf9f9b54
Gerrit-Change-Number: 34946
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in pysim[master]: pySim-shell: permit string with spaces for 'echo' command

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34947?usp=email )


Change subject: pySim-shell: permit string with spaces for 'echo' command
..

pySim-shell: permit string with spaces for 'echo' command

before this patch:

pySIM-shell (00:MF)> echo foo bar baz
usage: echo [-h] string
echo: error: unrecognized arguments: bar baz

after this patch:

pySIM-shell (00:MF)> echo foo bar baz
foo bar baz

Change-Id: I1369bc3aa975865e3a8a574c132e469813a9f6b9
---
M pySim-shell.py
1 file changed, 22 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/47/34947/1

diff --git a/pySim-shell.py b/pySim-shell.py
index d9c9f8c..306dd40 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -510,13 +510,13 @@
 first = False

 echo_parser = argparse.ArgumentParser()
-echo_parser.add_argument('string', help="string to echo on the shell")
+echo_parser.add_argument('string', help="string to echo on the shell", 
nargs='+')

 @cmd2.with_argparser(echo_parser)
 @cmd2.with_category(CUSTOM_CATEGORY)
 def do_echo(self, opts):
 """Echo (print) a string on the console"""
-self.poutput(opts.string)
+self.poutput(' '.join(opts.string))

 @cmd2.with_category(CUSTOM_CATEGORY)
 def do_version(self, opts):

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34947?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1369bc3aa975865e3a8a574c132e469813a9f6b9
Gerrit-Change-Number: 34947
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in pysim[master]: pySim-shell: Improved argument validation for verify_adm argument

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34945?usp=email )


Change subject: pySim-shell: Improved argument validation for verify_adm 
argument
..

pySim-shell: Improved argument validation for verify_adm argument

Let's make sure we don't even bother to ask the card to verify
anything as ADM1 pin which is not either a sequence of decimal digits
or an even number of hex digits (even number of bytes).

Change-Id: I4a193a3cf63462fad73d145ab1481070ddf767ca
---
M pySim-shell.py
M pySim/utils.py
2 files changed, 26 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/45/34945/1

diff --git a/pySim-shell.py b/pySim-shell.py
index 7aaa234..c59d18b 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -53,6 +53,7 @@
 from pySim.cards import card_detect, SimCardBase, UiccCardBase
 from pySim.utils import h2b, b2h, i2h, swap_nibbles, rpad, JsonEncoder, 
bertlv_parse_one, sw_match
 from pySim.utils import sanitize_pin_adm, tabulate_str_list, 
boxed_heading_str, Hexstr, dec_iccid
+from pySim.utils import hexstr_or_decimal
 from pySim.card_handler import CardHandler, CardHandlerAuto

 from pySim.filesystem import CardDF, CardADF, CardModel, CardApplication
@@ -777,7 +778,7 @@
 self._cmd.poutput("no description available")

 verify_adm_parser = argparse.ArgumentParser()
-verify_adm_parser.add_argument('ADM1', nargs='?', type=str,
+verify_adm_parser.add_argument('ADM1', nargs='?', type=hexstr_or_decimal,
help='ADM1 pin value. If none given, CSV 
file will be queried')

 @cmd2.with_argparser(verify_adm_parser)
diff --git a/pySim/utils.py b/pySim/utils.py
index 7459a3f..e6a6d2d 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -1467,3 +1467,14 @@
 def all_subclasses(cls) -> set:
 """Recursively get all subclasses of a specified class"""
 return set(cls.__subclasses__()).union([s for c in cls.__subclasses__() 
for s in all_subclasses(c)])
+
+def hexstr_or_decimal(instr: str):
+"""Method that can be used as 'type' in argparse.add_argument() to 
validate the value consists of
+[hexa]decimal digits only."""
+if instr.isdecimal():
+return instr
+if not all(c in string.hexdigits for c in instr):
+raise ValueError('Input must be [hexa]decimal')
+if len(instr) & 1:
+raise ValueError('Input has un-even number of hex digits')
+return instr

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4a193a3cf63462fad73d145ab1481070ddf767ca
Gerrit-Change-Number: 34945
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in pysim[master]: docs: shell: Various documentation updates/extensions

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34942?usp=email )


Change subject: docs: shell: Various documentation updates/extensions
..

docs: shell: Various documentation updates/extensions

* examples for export, verify_adm, reset, apdu
* explain CSV option for verify_adm
* fix 'tree' example (--help shouldn't be there)

Change-Id: I6ed8d8c5cf268ad3534e988eff9501f388b8d80f
---
M docs/shell.rst
1 file changed, 90 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/42/34942/1

diff --git a/docs/shell.rst b/docs/shell.rst
index 2f99cf5..97a1829 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -101,6 +101,19 @@
 all/most files.


+Example:
+::
+
+  pySIM-shell (00:MF)> export --json > /tmp/export.json
+  EXCEPTION of type 'RuntimeError' occurred with message: 'unable to export 50 
elementary file(s) and 2 dedicated file(s), also had to stop early due to 
exception:6e00: ARA-M - Invalid class'
+  To enable full traceback, run the following command: 'set debug true'
+  pySIM-shell (00:MF)>
+
+The exception above is more or less expected.  It just means that 50 files 
which are defined (most likely as
+optional files in some later 3GPP release) were not found on the card, or were 
invalidated/disabled when
+trying to SELECT them.
+
+
 tree
 
 Display a tree of the card filesystem.  It is important to note that this 
displays a tree
@@ -110,7 +123,7 @@
 Example:
 ::

-  pySIM-shell (00:MF)> tree --help
+  pySIM-shell (00:MF)> tree
   EF.DIR2f00 Application Directory
   EF.ICCID  2fe2 ICC Identification
   EF.PL 2f05 Preferred Languages
@@ -129,11 +142,62 @@

 Currently only ADM1 is supported.

+Example (successful):
+::
+
+  pySIM-shell (00:MF)> verify_adm 
+  pySIM-shell (00:MF)>
+
+In the above case, the ADM was successfully verified. Please make always sure 
to use the correct ADM1 for the
+specific card you have inserted! If you present a wrong ADM1 value several 
times consecutively, your card
+ADM1 will likely be permanently locked, meaning you will never be able to 
reach ADM1 privilege level.
+For sysmoUSIM/ISIM products, three consecutive wrong ADM1 values will lock the 
ADM1.
+
+Example (erroneous):
+::
+
+  pySIM-shell (00:MF)> verify_adm 1
+  EXCEPTION of type 'RuntimeError' occurred with message: 'Failed to verify 
chv_no 0x0A with code 0x31FF, 2 tries left.'
+  To enable full traceback, run the following command: 'set debug true'
+
+If you frequently work with the same set of cards that you need to modify 
using their ADM1, you can put a CSV
+file with those cards ICCID + ADM1 values into a CSV (comma separated value) 
file at ``~/.osmocom/pysim/card_data.csv``.  In this case,
+you can use the ``verify_adm`` command *without specifying an ADM1 value*.
+
+Example (successful):
+
+::
+
+  pySIM-shell (00:MF)> verify_adm
+  found ADM-PIN '' for ICCID '89882119000512'
+  pySIM-shell (00:MF)>
+
+In this case, the CSV file contained a record for the ICCID of the card 
() and that value was used to
+successfully verify ADM1.
+
+
+Example (erroneous):
+::
+
+  pySIM-shell (00:MF)> verify_adm
+  EXCEPTION of type 'ValueError' occurred with message: 'cannot find ADM-PIN 
for ICCID '89882119000512''
+  To enable full traceback, run the following command: 'set debug true'
+
+In this case there was no record for the ICCID of the card in the CSV file.
+

 reset
 ~
 Perform card reset and display the card ATR.

+Example:
+::
+
+  pySIM-shell (00:MF)> reset
+  Card ATR: 3b9f96801f878031e073fe211b674a357530350259c4
+  pySIM-shell (00:MF)> reset
+
+
 intro
 ~
 [Re-]Display the introductory banner
@@ -165,6 +229,18 @@
:module: pySim-shell
:func: PysimApp.apdu_cmd_parser

+Example:
+
+::
+
+  pySIM-shell (00:MF)> apdu 00a40400023f00
+  SW: 6700
+
+In the above case the raw APDU hex-string ``00a40400023f00`` was sent to the 
card, to which it responded with
+status word ``6700``.  Keep in mind that pySim-shell has no idea what kind of 
raw commands you are sending to the
+card, and it hence is unable to synchronize its internal state (such as the 
currently selected file) with the
+card.  The use of this command should hence be constrained to commands that do 
not have any high-level support
+in pySim-shell yet.


 ISO7816 commands

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34942?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6ed8d8c5cf268ad3534e988eff9501f388b8d80f
Gerrit-Change-Number: 34942
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in pysim[master]: pySim-shell: Use arparser for verify_adm to support --help

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34944?usp=email )


Change subject: pySim-shell: Use arparser for verify_adm to support --help
..

pySim-shell: Use arparser for verify_adm to support --help

Let's add a proper argparser instance for the 'verify_adm' command,
avoiding situations where the user types 'verif_adm --help' and then
--help is interpreted as the PIN value, removing one more attempt from
the failed ADM1 counter.

Let's use that opportunity to improve the documentation of the command.

Change-Id: I3321fae66a11efd00c53b66c7890fce84796e658
---
M docs/shell.rst
M pySim-shell.py
2 files changed, 32 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/44/34944/1

diff --git a/docs/shell.rst b/docs/shell.rst
index 7e04792..6da16ec 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -137,10 +137,11 @@

 verify_adm
 ~~
-Verify the ADM (Administrator) PIN specified as argument.  This is typically 
needed in order
-to get write/update permissions to most of the files on SIM cards.

-Currently only ADM1 is supported.
+.. argparse::
+   :module: pySim-shell
+   :func: PySimCommands.verify_adm_parser
+

 Example (successful):
 ::
diff --git a/pySim-shell.py b/pySim-shell.py
index c02555f..7aaa234 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -776,11 +776,19 @@
 else:
 self._cmd.poutput("no description available")

-def do_verify_adm(self, arg):
-"""VERIFY the ADM1 PIN"""
-if arg:
+verify_adm_parser = argparse.ArgumentParser()
+verify_adm_parser.add_argument('ADM1', nargs='?', type=str,
+   help='ADM1 pin value. If none given, CSV 
file will be queried')
+
+@cmd2.with_argparser(verify_adm_parser)
+def do_verify_adm(self, opts):
+"""Verify the ADM (Administrator) PIN specified as argument.  This is 
typically needed in order
+to get write/update permissions to most of the files on SIM cards.
+
+Currently only ADM1 is supported."""
+if opts.ADM1:
 # use specified ADM-PIN
-pin_adm = sanitize_pin_adm(arg)
+pin_adm = sanitize_pin_adm(opts.ADM1)
 else:
 # try to find an ADM-PIN if none is specified
 result = card_key_provider_get_field(

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34944?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I3321fae66a11efd00c53b66c7890fce84796e658
Gerrit-Change-Number: 34944
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in pysim[master]: pySim-shell: Add copyright statement and link to online manual to banner

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34943?usp=email )


Change subject: pySim-shell: Add copyright statement and link to online manual 
to banner
..

pySim-shell: Add copyright statement and link to online manual to banner

This way the users are reminded where they can go to read the manual.

Change-Id: Ie86822e73bccb3c585cecc818d4462d4ca6e43c2
---
M docs/shell.rst
M pySim-shell.py
2 files changed, 23 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/43/34943/1

diff --git a/docs/shell.rst b/docs/shell.rst
index 97a1829..7e04792 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -202,6 +202,14 @@
 ~
 [Re-]Display the introductory banner

+Example:
+::
+
+  pySIM-shell (00:MF)> intro
+  Welcome to pySim-shell!
+  (C) 2021-2023 by Harald Welte, sysmocom - s.f.m.c. GmbH and contributors
+  Online manual available at 
https://downloads.osmocom.org/docs/pysim/master/html/shell.html
+

 equip
 ~
diff --git a/pySim-shell.py b/pySim-shell.py
index bbb14b2..c02555f 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -174,6 +174,9 @@

 class PysimApp(Cmd2Compat):
 CUSTOM_CATEGORY = 'pySim Commands'
+BANNER = """Welcome to pySim-shell!
+(C) 2021-2023 by Harald Welte, sysmocom - s.f.m.c. GmbH and contributors
+Online manual available at 
https://downloads.osmocom.org/docs/pysim/master/html/shell.html """

 def __init__(self, card, rs, sl, ch, script=None):
 if version.parse(cmd2.__version__) < version.parse("2.0.0"):
@@ -184,7 +187,7 @@
 # pylint: disable=unexpected-keyword-arg
 super().__init__(persistent_history_file='~/.pysim_shell_history', 
allow_cli_args=False,
  auto_load_commands=False, startup_script=script, 
**kwargs)
-self.intro = style('Welcome to pySim-shell!', fg=RED)
+self.intro = style(self.BANNER, fg=RED)
 self.default_category = 'pySim-shell built-in commands'
 self.card = None
 self.rs = None

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34943?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ie86822e73bccb3c585cecc818d4462d4ca6e43c2
Gerrit-Change-Number: 34943
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in osmo-mgw[master]: mgcp-client: MGCP response: pass fmtp to caller

2023-11-01 Thread neels
Attention is currently required from: laforge, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34905?usp=email )

Change subject: mgcp-client: MGCP response: pass fmtp to caller
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34905?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If8ca5c3880cad9e41b80e9d1c821439b0d7b7e23
Gerrit-Change-Number: 34905
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 01 Nov 2023 21:17:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[L] Change in osmo-mgw[master]: add fmtp string to ptmap: allow all possible fmtp

2023-11-01 Thread neels
Attention is currently required from: laforge, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email )

Change subject: add fmtp string to ptmap: allow all possible fmtp
..


Patch Set 5:

(2 comments)

File include/osmocom/mgcp_client/mgcp_client.h:

https://gerrit.osmocom.org/c/osmo-mgw/+/34900/comment/60561c13_319e5059
PS4, Line 165:  * Not all pointers contained in the mgcp_response */
> erm ... no i didn't write this. i started out with dexter's patch, maybe 
> that's where it came from.. […]
Done


File tests/mgcp/mgcp_test.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/34900/comment/3a136ae5_3a508922
PS4, Line 848:  fflush(stderr);
> another such something i didn't see, thx
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b
Gerrit-Change-Number: 34900
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: dexter 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 01 Nov 2023 21:16:52 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically

2023-11-01 Thread neels
Attention is currently required from: dexter.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email )

Change subject: mgcp_client_fsm: allocate struct mgcp_conn_peer dynamically
..


Patch Set 9:

(4 comments)

This change is ready for review.

File src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/34404/comment/8fbc184f_38afefd0
PS5, Line 692:  osmo_strlcpy(cleared_ci.mgcp_ci_str, ci->mgcp_ci_str, 
sizeof(cleared_ci.mgcp_ci_str));
> mark
Done


https://gerrit.osmocom.org/c/osmo-mgw/+/34404/comment/8074c879_64a30269
PS5, Line 826:  .ep = ep,
> mark
Done


https://gerrit.osmocom.org/c/osmo-mgw/+/34404/comment/33b4e5d2_e5b39f31
PS5, Line 1052: *ci = (struct osmo_mgcpc_ep_ci){
> mark
Done


File src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/34404/comment/02fbdf1b_c160c06c
PS7, Line 98:   struct mgcp_conn_peer *verb_info;
> since this struct is used only within this .c file scope, there is no need to 
> modify this code. […]
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34404?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I523d0fcb020f7d46323c497a4be9ee00d5f242ba
Gerrit-Change-Number: 34404
Gerrit-PatchSet: 9
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 21:16:11 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels 
Gerrit-MessageType: comment


[L] Change in osmo-mgw[master]: add fmtp string to ptmap: allow all possible fmtp

2023-11-01 Thread neels
Attention is currently required from: laforge, pespin.

Hello Jenkins Builder, laforge,

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

https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder


Change subject: add fmtp string to ptmap: allow all possible fmtp
..

add fmtp string to ptmap: allow all possible fmtp

Remove the limit of having only one AMR octet-aligned fmtp parameter per
MGCP message. Instead allow any arbitrary fmtp options, one per every
codec.

Deprecate all use of struct mgcp_codec_param. Instead, store and pass
plain fmtp strings.

We need to know fmtp details only for AMR, and only to probe whether it
is octet-aligned. So add a separate fmtp string parser that returns that
information flexibly, as in

  if (osmo_mgcp_fmtp_get_int("octet-aligned", 0) == 1) ...

Provide legacy shims that still act correctly for any callers that may
pass the old struct mgcp_codec_param. (I'm not sure if we need to keep
this, but we can always drop it in another patch.)

Adjust one mgcp_test.c: instead of returning only the octet-aligned
parameter, now osmo-mgw keeps and returns all the fmtp parameters that
the user provided. So add the missing "mode-change-capability".

Related: OS#6171
Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b
---
M include/osmocom/mgcp/Makefile.am
A include/osmocom/mgcp/fmtp.h
M include/osmocom/mgcp/mgcp_codec.h
M include/osmocom/mgcp/mgcp_common.h
M include/osmocom/mgcp/mgcp_network.h
M include/osmocom/mgcp_client/mgcp_client.h
M include/osmocom/mgcp_client/mgcp_client_fsm.h
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp/Makefile.am
A src/libosmo-mgcp/fmtp.c
M src/libosmo-mgcp/mgcp_codec.c
M src/libosmo-mgcp/mgcp_network.c
M src/libosmo-mgcp/mgcp_protocol.c
M src/libosmo-mgcp/mgcp_sdp.c
M tests/mgcp/mgcp_test.c
15 files changed, 270 insertions(+), 105 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/00/34900/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b
Gerrit-Change-Number: 34900
Gerrit-PatchSet: 5
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: dexter 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[M] Change in osmo-mgw[master]: mgcp-client: MGCP response: pass fmtp to caller

2023-11-01 Thread neels
Attention is currently required from: laforge, neels, pespin.

Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmo-mgw/+/34905?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+1 by pespin, Code-Review+2 by neels, 
Verified+1 by Jenkins Builder

The change is no longer submittable: Code-Review and Verified are unsatisfied 
now.


Change subject: mgcp-client: MGCP response: pass fmtp to caller
..

mgcp-client: MGCP response: pass fmtp to caller

When receiving MGCP responses, so far libosmo-mgcp-client completely
ignored a=fmtp: parameters (like 'octet-align'). Add fmtp parsing to
pass the fmtp string to the caller as-is.

Since the responses so far never included the octet_aligned flags, do
not bother to parse fmtp to populate the legacy items. New callers
should use the fmtp string.

Change-Id: If8ca5c3880cad9e41b80e9d1c821439b0d7b7e23
---
M src/libosmo-mgcp-client/mgcp_client.c
1 file changed, 57 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/05/34905/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34905?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If8ca5c3880cad9e41b80e9d1c821439b0d7b7e23
Gerrit-Change-Number: 34905
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


[S] Change in osmo-mgw[master]: mgcp_client_fsm: explain member param in struct mgcp_conn_peer better

2023-11-01 Thread neels
Attention is currently required from: dexter.

neels has uploaded a new patch set (#8) to the change originally created by 
dexter. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34350?usp=email )

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder

The change is no longer submittable: Verified is unsatisfied now.


Change subject: mgcp_client_fsm: explain member param in struct mgcp_conn_peer 
better
..

mgcp_client_fsm: explain member param in struct mgcp_conn_peer better

The struct member param specifies additional codec parameters. Let's
improve its explaination.

Change-Id: Iea4dc1e72fccaa464ce503fae88b5d8a867b1d19
Related: OS#6171
---
M include/osmocom/mgcp_client/mgcp_client_fsm.h
1 file changed, 15 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/34350/8
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34350?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Iea4dc1e72fccaa464ce503fae88b5d8a867b1d19
Gerrit-Change-Number: 34350
Gerrit-PatchSet: 8
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: neels 
Gerrit-Attention: dexter 
Gerrit-MessageType: newpatchset


[L] Change in osmo-mgw[master]: add fmtp string to ptmap: allow all possible fmtp

2023-11-01 Thread neels
Attention is currently required from: pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email )

Change subject: add fmtp string to ptmap: allow all possible fmtp
..


Patch Set 4:

(2 comments)

File include/osmocom/mgcp_client/mgcp_client.h:

https://gerrit.osmocom.org/c/osmo-mgw/+/34900/comment/d9843f6b_d3a929cb
PS4, Line 165:  * Not all pointers contained in the mgcp_response */
> what do you mean with this?
erm ... no i didn't write this. i started out with dexter's patch, maybe that's 
where it came from...?

what is it trying to say, i guess mgcp_response allocation is not entirely 
self-contained.

Looking, though, it actually does self-contain all its members, except for the 
'sdp' pointer that includes the originally parsed SDP string. So seems to have 
become unrelated to this patch.


File tests/mgcp/mgcp_test.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/34900/comment/3f2647a6_b3917892
PS4, Line 848:  fflush(stderr);
> is this really needed? […]
another such something i didn't see, thx



--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34900?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If58590bda8627519ff07e0b6f43aa47a274f052b
Gerrit-Change-Number: 34900
Gerrit-PatchSet: 4
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: dexter 
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 01 Nov 2023 21:04:53 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: mgcp-client: MGCP response: pass fmtp to caller

2023-11-01 Thread neels
neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34905?usp=email )

Change subject: mgcp-client: MGCP response: pass fmtp to caller
..


Patch Set 1: Code-Review+2

(1 comment)

Patchset:

PS1:
combine votes



--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34905?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If8ca5c3880cad9e41b80e9d1c821439b0d7b7e23
Gerrit-Change-Number: 34905
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 01 Nov 2023 20:58:08 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-hnbgw[master]: X31: fix vty doc

2023-11-01 Thread neels
Attention is currently required from: laforge, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34933?usp=email )

Change subject: X31: fix vty doc
..


Patch Set 2:

(1 comment)

File src/osmo-hnbgw/tdefs.c:

https://gerrit.osmocom.org/c/osmo-hnbgw/+/34933/comment/9ac6cefa_0bb4f6ef
PS1, Line 37:   {.T = -31, .default_val = 5, .desc = "Timeout for establishing 
and releasing context maps (RUA <-> SCCP)" },
> Timeout *during/while* establishing and releasing... […]
IMHO "Timeout for" is much better English. It's also used likewise one line 
below.



--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34933?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I75a25f9065bc651e7ba8feda6db03c49a3b75c5e
Gerrit-Change-Number: 34933
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 01 Nov 2023 20:56:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in osmo-hnbgw[master]: X31: fix vty doc

2023-11-01 Thread neels
Attention is currently required from: laforge.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34933?usp=email )

Change subject: X31: fix vty doc
..


Patch Set 2: Code-Review+1

(1 comment)

Patchset:

PS2:
re-add vote after resolving trivial merge conflict



--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34933?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I75a25f9065bc651e7ba8feda6db03c49a3b75c5e
Gerrit-Change-Number: 34933
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 01 Nov 2023 20:54:20 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-hnbgw[master]: X31: fix vty doc

2023-11-01 Thread neels
Attention is currently required from: laforge, neels.

Hello Jenkins Builder, laforge,

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

https://gerrit.osmocom.org/c/osmo-hnbgw/+/34933?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder


Change subject: X31: fix vty doc
..

X31: fix vty doc

The actual scope is larger than just a stale release. Every RUA and SCCP
context map FSM state that has a timeout uses X31. (Seems I intended to
add more timers but forgot to follow up when I wrote it.)

Related: SYS#6602
Change-Id: I75a25f9065bc651e7ba8feda6db03c49a3b75c5e
---
M src/osmo-hnbgw/tdefs.c
1 file changed, 15 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/33/34933/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34933?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I75a25f9065bc651e7ba8feda6db03c49a3b75c5e
Gerrit-Change-Number: 34933
Gerrit-PatchSet: 2
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


[M] Change in osmo-mgw[master]: vty and log: also show local port for RTP conns

2023-11-01 Thread neels
Attention is currently required from: dexter, keith, osmith, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email )

Change subject: vty and log: also show local port for RTP conns
..


Patch Set 3: Code-Review+1

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-mgw/+/34150/comment/2ba4b0fa_c39d8df3
PS3, Line 15: CONN: (1226/rtp C:D94316AD 
r=127.0.0.2:2344<->l=127.0.0.1:4002)
i'm not so sure about the id:0x -> C: change. We print 0x for MGCP conn ids 
everywhere else, right? I like the C: better because it is shorter and matches 
the MGCP protocol.



--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 3
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: keith 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 20:51:55 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: vty and log: also show local port for RTP conns

2023-11-01 Thread neels
Attention is currently required from: dexter, keith, osmith, pespin.

neels has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email )

Change subject: vty and log: also show local port for RTP conns
..


Patch Set 3:

(2 comments)

Patchset:

PS3:
This is a good patch of yours. I can imagine the annoyance of not seeing the 
useful information!

I fancied trying around a bit and ended up with this ready new patch set as a 
suggestion, feel free to discard / push over it if it's not to your liking.


File src/libosmo-mgcp/mgcp_conn.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/34150/comment/671355d6_f4628bf2
PS1, Line 373:  "rtp:%u<->%u rtcp:%u)",
> I'm totally fine with dropping the rtcp part. […]
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 3
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: neels 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: keith 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 20:49:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: keith 
Comment-In-Reply-To: dexter 
Gerrit-MessageType: comment


[M] Change in osmo-mgw[master]: vty and log: also show local port for RTP conns

2023-11-01 Thread neels
Attention is currently required from: dexter, keith, osmith.

neels has uploaded a new patch set (#3) to the change originally created by 
keith. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email )

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: vty and log: also show local port for RTP conns
..

vty and log: also show local port for RTP conns

Before:

CONN: (1226/rtp, id:0xD94316AD, ip:127.0.0.2, rtp:2344 rtcp:2345)

After:

CONN: (1226/rtp C:D94316AD r=127.0.0.2:2344<->l=127.0.0.1:4002)

While changing that string, also include these changes for consistency
and readability:

- use the same r:...<->l:... format as osmo_sock_get_name().
- Instead of 'id:0x' use the actual MGCP format 'C: 9B686BE3'.
- drop the commas
- drop RTCP port: it is always RTP+1 and always an odd number.

Rationale:
The CONN pairs associated with each endpoint show remote RTP
ports. When osmo-mgw is being used by both BSC and MSC, one
side of the pair is showing the internal loop connection inside
osmo-mgw, while my intuition suggested this connection pair
is showing me the RTP port tuple of a single RTP stream. Adding
the local port to the display makes it more clear, IMHO.
Seeing the local port can also help to correlate the MGW vty
dump with a capture of RTP.

Implementation:
I first tried directly using osmo_sock_get_name_buf() on
conn->u.rtp.end.rtp.fd, but that might hide already known information
when the fd is not actively used yet (before SDP): the local address and
port would then be shown from the fd, not from
conn->u.rtp.end.local_addr/_port == hidden before the fd is set up.

Patch-By: whytek, nhofmeyr
Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
---
M src/libosmo-mgcp/mgcp_conn.c
1 file changed, 58 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/34150/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 3
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: keith 
Gerrit-Attention: dexter 
Gerrit-MessageType: newpatchset


[S] Change in osmo-mgw[master]: add mgcp_conn_rtp_type_names[]

2023-11-01 Thread neels
neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/34941?usp=email )


Change subject: add mgcp_conn_rtp_type_names[]
..

add mgcp_conn_rtp_type_names[]

First use in upcoming Ib89a6779e1d68c6600f00699d4303f6c0ee07132

Change-Id: If3d8bc68a3b26d3aa0ba7eedeab67b820889ed54
---
M include/osmocom/mgcp/mgcp_conn.h
M src/libosmo-mgcp/mgcp_conn.c
2 files changed, 23 insertions(+), 0 deletions(-)



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

diff --git a/include/osmocom/mgcp/mgcp_conn.h b/include/osmocom/mgcp/mgcp_conn.h
index 7ac40ab..4f7b705 100644
--- a/include/osmocom/mgcp/mgcp_conn.h
+++ b/include/osmocom/mgcp/mgcp_conn.h
@@ -49,6 +49,11 @@
MGCP_RTP_OSMUX,
MGCP_RTP_IUUP,
 };
+extern const struct value_string mgcp_conn_rtp_type_names[];
+static inline const char *mgcp_conn_rtp_type_name(enum mgcp_conn_rtp_type val)
+{
+   return get_value_string(mgcp_conn_rtp_type_names, val);
+}

 /*! Connection type, specifies which member of the union "u" in mgcp_conn
  *  contains a useful connection description (currently only RTP) */
diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c
index 0ba10e5..afc9e4e 100644
--- a/src/libosmo-mgcp/mgcp_conn.c
+++ b/src/libosmo-mgcp/mgcp_conn.c
@@ -441,3 +441,10 @@

return llist_last_entry(>conns, struct mgcp_conn, entry);
 }
+
+const struct value_string mgcp_conn_rtp_type_names[] = {
+   { MGCP_RTP_DEFAULT, "rtp" },
+   { MGCP_RTP_OSMUX, "osmux" },
+   { MGCP_RTP_IUUP, "iuup" },
+   {}
+};

--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34941?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: If3d8bc68a3b26d3aa0ba7eedeab67b820889ed54
Gerrit-Change-Number: 34941
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-MessageType: newchange


[M] Change in pysim[master]: docs: shell: update output in examples

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34940?usp=email )


Change subject: docs: shell: update output in examples
..

docs: shell: update output in examples

pySim-shell output has changed over time, so some examples were
showing outdated content.  Let's update those.

Change-Id: I4058719c32b61689522e90eba37253e8accb8ba5
---
M docs/shell.rst
1 file changed, 48 insertions(+), 20 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/40/34940/1

diff --git a/docs/shell.rst b/docs/shell.rst
index 1b27edc..2f99cf5 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -215,7 +215,11 @@
   },
   "life_cycle_status_int": "operational_activated",
   "security_attrib_compact": "00",
-  "pin_status_template_do": "90017083010183018183010A83010B"
+  "pin_status_template_do": {
+  "ps_do": "70",
+  "key_reference": 11
+  }
+
   }
   pySIM-shell (00:MF/ADF.USIM)>

@@ -467,29 +471,40 @@
 parameter.   That's where the JSONpath support comes in handy:  You can 
specify a JSONpath to an element
 inside the document as well as a new value for tat field:

-Th below example demonstrates this by modifying the ofm field within EF.AD:
+The below example demonstrates this by modifying the ciphering indicator field 
within EF.AD:

 ::

   pySIM-shell (00:MF/ADF.USIM/EF.AD)> read_binary_decoded
+
   {
-  "ms_operation_mode": "normal",
-  "specific_facilities": {
-  "ofm": true
+  "ms_operation_mode": "normal_and_specific_facilities",
+  "additional_info": {
+  "ciphering_indicator": false,
+  "csg_display_control": false,
+  "prose_services": false,
+  "extended_drx": true
   },
-  "len_of_mnc_in_imsi": 2
+  "rfu": 0,
+  "mnc_len": 2,
+  "extensions": "ff"
   }
-  pySIM-shell (00:MF/ADF.USIM/EF.AD)> update_binary_decoded --json-path 
specific_facilities.ofm false
+  pySIM-shell (00:MF/ADF.USIM/EF.AD)> update_binary_decoded --json-path 
additional_info.ciphering_indicator true
+  "01000902ff"
   pySIM-shell (00:MF/ADF.USIM/EF.AD)> read_binary_decoded
   {
-  "ms_operation_mode": "normal",
-  "specific_facilities": {
-  "ofm": false
+  "ms_operation_mode": "normal_and_specific_facilities",
+  "additional_info": {
+  "ciphering_indicator": true,
+  "csg_display_control": false,
+  "prose_services": false,
+  "extended_drx": true
   },
-  "len_of_mnc_in_imsi": 2
+  "rfu": 0,
+  "mnc_len": 2,
+  "extensions": "ff"
   }

-
 edit_binary_decoded
 ~~~
 This command will read the selected binary EF, decode it to its JSON 
representation, save
@@ -736,30 +751,31 @@
 ::

   pySIM-shell (00:MF/ADF.ARA-M)> aram_get_all
+
   [
   {
-  "ResponseAllRefArDO": [
+  "response_all_ref_ar_do": [
   {
-  "RefArDO": [
+  "ref_ar_do": [
   {
-  "RefDO": [
+  "ref_do": [
   {
-  "AidRefDO": ""
+  "aid_ref_do": ""
   },
   {
-  "DevAppIdRefDO": 
"e46872f28b350b7e1f140de535c2a8d5804f0be3"
+  "dev_app_id_ref_do": 
"e46872f28b350b7e1f140de535c2a8d5804f0be3"
   }
   ]
   },
   {
-  "ArDO": [
+  "ar_do": [
   {
-  "ApduArDO": {
+  "apdu_ar_do": {
   "generic_access_rule": "always"
   }
   },
   {
-  "PermArDO": {
+  "perm_ar_do": {
   "permissions": "0001"
   }
   }

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34940?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4058719c32b61689522e90eba37253e8accb8ba5
Gerrit-Change-Number: 34940
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in pysim[master]: docs: shell: Re-order the command sections/classes

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34938?usp=email )


Change subject: docs: shell: Re-order the command sections/classes
..

docs: shell: Re-order the command sections/classes

the generic pysim command should precede those from specs like ISO7816

Change-Id: I11e66757f10cc28fda547244ae09d51dacd70824
---
M docs/shell.rst
1 file changed, 122 insertions(+), 110 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/38/34938/1

diff --git a/docs/shell.rst b/docs/shell.rst
index ce66dfa..1b27edc 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -55,6 +55,117 @@
 to learn about those.


+pySim commands
+--
+
+Commands in this category are pySim specific; they do not have a 1:1 
correspondence to ISO 7816
+or 3GPP commands. Mostly they will operate either only on local (in-memory) 
state, or execute
+a complex sequence of card-commands.
+
+desc
+
+Display human readable file description for the currently selected file.
+
+
+dir
+~~~
+.. argparse::
+   :module: pySim-shell
+   :func: PySimCommands.dir_parser
+
+Example:
+::
+
+  pySIM-shell (00:MF)> dir
+  MF
+  3f00
+   ..  ADF.USIMDF.SYSTEM   EF.DIR  EF.UMPC
+   ADF.ARA-M   DF.EIRENE   DF.TELECOM  EF.ICCIDMF
+   ADF.ISIMDF.GSM  EF.ARR  EF.PL
+  14 files
+
+
+export
+~~
+.. argparse::
+   :module: pySim-shell
+   :func: PySimCommands.export_parser
+
+Please note that `export` works relative to the current working
+directory, so if you are in `MF`, then the export will contain all known
+files on the card.  However, if you are in `ADF.ISIM`, only files below
+that ADF will be part of the export.
+
+Furthermore, it is strongly advised to first enter the ADM1 pin
+(`verify_adm`) to maximize the chance of having permission to read
+all/most files.
+
+
+tree
+
+Display a tree of the card filesystem.  It is important to note that this 
displays a tree
+of files that might potentially exist (based on the card profile).  In order 
to determine if
+a given file really exists on a given card, you have to try to select that 
file.
+
+Example:
+::
+
+  pySIM-shell (00:MF)> tree --help
+  EF.DIR2f00 Application Directory
+  EF.ICCID  2fe2 ICC Identification
+  EF.PL 2f05 Preferred Languages
+  EF.ARR2f06 Access Rule Reference
+  EF.UMPC   2f08 UICC Maximum Power Consumption
+  DF.TELECOM7f10 None
+EF.ADN  6f3a Abbreviated Dialing Numbers
+  ...
+
+
+
+verify_adm
+~~
+Verify the ADM (Administrator) PIN specified as argument.  This is typically 
needed in order
+to get write/update permissions to most of the files on SIM cards.
+
+Currently only ADM1 is supported.
+
+
+reset
+~
+Perform card reset and display the card ATR.
+
+intro
+~
+[Re-]Display the introductory banner
+
+
+equip
+~
+Equip pySim-shell with a card; particularly useful if the program was
+started before a card was present, or after a card has been replaced by
+the user while pySim-shell was kept running.
+
+bulk_script
+~~~
+.. argparse::
+   :module: pySim-shell
+   :func: PysimApp.bulk_script_parser
+
+
+echo
+
+.. argparse::
+   :module: pySim-shell
+   :func: PysimApp.echo_parser
+
+
+apdu
+
+.. argparse::
+   :module: pySim-shell
+   :func: PysimApp.apdu_cmd_parser
+
+

 ISO7816 commands
 
@@ -243,116 +354,6 @@
:func: CardProfileUICC.AddlShellCommands.resume_uicc_parser


-pySim commands
---
-
-Commands in this category are pySim specific; they do not have a 1:1 
correspondence to ISO 7816
-or 3GPP commands. Mostly they will operate either only on local (in-memory) 
state, or execute
-a complex sequence of card-commands.
-
-desc
-
-Display human readable file description for the currently selected file.
-
-
-dir
-~~~
-.. argparse::
-   :module: pySim-shell
-   :func: PySimCommands.dir_parser
-
-Example:
-::
-
-  pySIM-shell (00:MF)> dir
-  MF
-  3f00
-   ..  ADF.USIMDF.SYSTEM   EF.DIR  EF.UMPC
-   ADF.ARA-M   DF.EIRENE   DF.TELECOM  EF.ICCIDMF
-   ADF.ISIMDF.GSM  EF.ARR  EF.PL
-  14 files
-
-
-export
-~~
-.. argparse::
-   :module: pySim-shell
-   :func: PySimCommands.export_parser
-
-Please note that `export` works relative to the current working
-directory, so if you are in `MF`, then the export will contain all known
-files on the card.  However, if you are in `ADF.ISIM`, only files below
-that ADF will be part of the export.
-
-Furthermore, it is strongly advised to first enter the ADM1 pin
-(`verify_adm`) to maximize the chance of having permission to read
-all/most files.
-
-
-tree
-
-Display a tree of the card filesystem.  It is important to note that this 
displays a tree
-of files that might potentially exist (based on the card profile).  In order 
to determine if

[S] Change in pysim[master]: docs: Fix docstring syntax to avoid warnings

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34939?usp=email )


Change subject: docs: Fix docstring syntax to avoid warnings
..

docs: Fix docstring syntax to avoid warnings

pySim/tlv.py:docstring of pySim.tlv.IE.from_bytes:1: ERROR: Unknown target 
name: "part".
pySim/tlv.py:docstring of pySim.tlv.IE.to_bytes:1: ERROR: Unknown target name: 
"part".

Change-Id: I170176910c4519005b9276dbe5854aaaecb58efb
---
M pySim/tlv.py
1 file changed, 14 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/39/34939/1

diff --git a/pySim/tlv.py b/pySim/tlv.py
index 827972f..7f20559 100644
--- a/pySim/tlv.py
+++ b/pySim/tlv.py
@@ -178,7 +178,7 @@
 """Convert the internal representation to entire IE including IE 
header."""

 def to_bytes(self) -> bytes:
-"""Convert the internal representation _of the value part_ to binary 
bytes."""
+"""Convert the internal representation *of the value part* to binary 
bytes."""
 if self.is_constructed():
 # concatenate the encoded IE of all children to form the value part
 out = b''
@@ -189,7 +189,7 @@
 return super().to_bytes()

 def from_bytes(self, do: bytes):
-"""Parse _the value part_ from binary bytes to internal 
representation."""
+"""Parse *the value part* from binary bytes to internal 
representation."""
 if self.nested_collection:
 self.children = self.nested_collection.from_bytes(do)
 else:

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34939?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I170176910c4519005b9276dbe5854aaaecb58efb
Gerrit-Change-Number: 34939
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in pysim[master]: docs: shell: By now we have encoders/decoders for most files

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34936?usp=email )


Change subject: docs: shell: By now we have encoders/decoders for most files
..

docs: shell: By now we have encoders/decoders for most files

Change-Id: Ia771f9969ae7eb0094d1768af3f7f54cc9d0d581
---
M docs/shell.rst
1 file changed, 11 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/36/34936/1

diff --git a/docs/shell.rst b/docs/shell.rst
index c7e788a..2a16965 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -11,9 +11,9 @@
 * CHV/PIN management (VERIFY, ENABLE, DISABLE, UNBLOCK)
 * decoding of SELECT response (file control parameters)
 * reading and writing of files and records in raw, hex-encoded binary format
-* for some files where related support has been developed:
+* for most files (where related file-specific encoder/decoder classes have 
been developed):

- * decoded reading (display file data in JSON format)
+ * decoded reading (display file data represented in human and machine 
readable JSON format)
  * decoded writing (encode from JSON to binary format, then write)

 By means of using the python ``cmd2`` module, various useful features improve 
usability:

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34936?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia771f9969ae7eb0094d1768af3f7f54cc9d0d581
Gerrit-Change-Number: 34936
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in pysim[master]: docs: shell: Clarify various different card support

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34935?usp=email )


Change subject: docs: shell: Clarify various different card support
..

docs: shell: Clarify various different card support

Change-Id: Ibf8e3538aa3c954df72c11ec0a2f885031b54b0e
---
M docs/shell.rst
1 file changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/35/34935/1

diff --git a/docs/shell.rst b/docs/shell.rst
index de30ae7..c7e788a 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -1,7 +1,8 @@
 pySim-shell
 ===

-pySim-shell is an interactive command line shell for all kind of interactions 
with SIM cards.
+pySim-shell is an interactive command line shell for all kind of interactions 
with SIM cards,
+including classic GSM SIM, GSM-R SIM, UICC, USIM, ISIM, HPSIM and recently 
even eUICC.

 The interactive shell provides command for


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34935?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ibf8e3538aa3c954df72c11ec0a2f885031b54b0e
Gerrit-Change-Number: 34935
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[S] Change in pysim[master]: docs: shell: link to cmd2 documentation

2023-11-01 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/pysim/+/34937?usp=email )


Change subject: docs: shell: link to cmd2 documentation
..

docs: shell: link to cmd2 documentation

Change-Id: I532cb33781f95fe847db7fae7a5264b5d9c416de
---
M docs/shell.rst
1 file changed, 12 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/37/34937/1

diff --git a/docs/shell.rst b/docs/shell.rst
index 2a16965..ce66dfa 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -50,7 +50,9 @@
 cmd2 basics
 ---

-FIXME
+As pySim-shell is built upon ``cmd``, some generic cmd2 commands/features are 
available.  You may
+want to check out the `cmd2 Builtin commands 
`_
+to learn about those.




--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34937?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I532cb33781f95fe847db7fae7a5264b5d9c416de
Gerrit-Change-Number: 34937
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange


[M] Change in pysim[master]: runtime: refactor file selection methods select and select_file

2023-11-01 Thread fixeria
Attention is currently required from: dexter.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34932?usp=email )

Change subject: runtime: refactor file selection methods select and select_file
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2
Gerrit-Change-Number: 34932
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 16:41:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: PCUIF: upgrade to PCUIF v12

2023-11-01 Thread dexter
Attention is currently required from: dexter.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34934?usp=email

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


Change subject: PCUIF: upgrade to PCUIF v12
..

PCUIF: upgrade to PCUIF v12

We have added an additional bts_model field to the PCUIF_info_ind. This
also means that we have to increment the PCUIF version number since
adding fields is a major change to the protocol. This patch updates the
related TTCN3 record and also increments the PCUIF version number.

Related: OS#6191
Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Change-Id: Ib1516e66c70f021adee49f41bd707803fc06f9cf
---
M bts/BTS_Tests.default
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests.default
M pcu/PCU_Tests_SNS.cfg
M pcu/PCU_Tests_SNSv6.cfg
5 files changed, 25 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/34/34934/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34934?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib1516e66c70f021adee49f41bd707803fc06f9cf
Gerrit-Change-Number: 34934
Gerrit-PatchSet: 4
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter 
Gerrit-MessageType: newpatchset


[S] Change in osmo-ttcn3-hacks[master]: PCUIF: upgrade to PCUIF v12

2023-11-01 Thread dexter
Attention is currently required from: dexter.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34934?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: PCUIF: upgrade to PCUIF v12
..

PCUIF: upgrade to PCUIF v12

Related: OS#6191
Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Change-Id: Ib1516e66c70f021adee49f41bd707803fc06f9cf
---
M bts/BTS_Tests.default
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests.default
M pcu/PCU_Tests_SNS.cfg
M pcu/PCU_Tests_SNSv6.cfg
5 files changed, 20 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/34/34934/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34934?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib1516e66c70f021adee49f41bd707803fc06f9cf
Gerrit-Change-Number: 34934
Gerrit-PatchSet: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter 
Gerrit-MessageType: newpatchset


[M] Change in osmo-msc[master]: manuals: add section about the SGs interface.

2023-11-01 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/34870?usp=email )

Change subject: manuals: add section about the SGs interface.
..

manuals: add section about the SGs interface.

The SGs interface is currently only casually mentioned in the chapter
running, even though the SGs interface is a prominent and often
requested feature. Let's give the SGs interface its own section so that
users can find the info about it quicker.

Related: OS#6008
Change-Id: Ic7c17511ee19cb7f6d5069b27beb661ecb4b0be8
---
M doc/manuals/chapters/running.adoc
A doc/manuals/chapters/sgs.adoc
M doc/manuals/osmomsc-usermanual.adoc
3 files changed, 74 insertions(+), 9 deletions(-)

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




diff --git a/doc/manuals/chapters/running.adoc 
b/doc/manuals/chapters/running.adoc
index d6e734b..3041145 100644
--- a/doc/manuals/chapters/running.adoc
+++ b/doc/manuals/chapters/running.adoc
@@ -74,15 +74,8 @@

 More on MNCC in <>.

-The SGs interface by default listens on 0.0.0.0:29118. Configure a different 
IP and/or port for each osmo-msc instance.
-You may also want to configure different VLR names:
-
-
-sgs
- local-ip 127.0.0.1
- local-port 29118
- vlr-name vlr.example.net
-
+The SGs interface by default listens on 0.0.0.0:29118 (SCTP). Each instance of 
OsmoMSC must use a different IP address
+and/or port. For details about the configuration of the SGs interface, see 
section <>.

 For the following links, OsmoMSC acts as a client and does not listen/bind to a
 specific interface, and will hence not encounter conflicts for multiple 
instances
diff --git a/doc/manuals/chapters/sgs.adoc b/doc/manuals/chapters/sgs.adoc
new file mode 100644
index 000..1f0240b
--- /dev/null
+++ b/doc/manuals/chapters/sgs.adoc
@@ -0,0 +1,55 @@
+[[sgs]]
+== SGs interface
+
+OsmoMSC offers an SGs interface using the SGsAP protocol. The SGs interface is 
an
+optional interface between a 2G (GERAN) / 3G (UTRAN) MSC and an 4G (EUTRAN) 
MME.
+Its purpose is to facilitate both CSFB (Circuit-Switched Fall Back) and SMSoS
+(SMS over SGs). It is used for Mobility management (MM) and paging procedures
+between the EPS (Evolved Packet Services) and CS (Circuit Switched) domain.
+
+=== VTY configuration
+
+The SGs interface implementation in OsmoMSC is automatically active and 
requires
+only minimal configuration. When no specific configuration is provided OsmoMSC
+will listen on 0.0.0.0:29118 (SCTP) for incoming connections.
+
+This is sufficient in the most configurations, but in larger installations,
+where services are either tied to specific interfaces and/or more instances of
+OsmoMSC run in parallel, a custom configuration is necessary.
+
+The user has the option to configure the IP address (`local-ip`) and the SCTP
+port (`local-port`) and also the `vlr-name` that OsmoMSC uses to identify 
itself
+towards the MME. It should be noted that the `vlr-name` is usually the DNS name
+for the IP address of the VLR/MSC, so IP address used and the `vlr-name` should
+match the DNS server entry.
+
+
+sgs
+ local-ip 127.0.0.1
+ local-port 29118
+ vlr-name vlr.example.net
+
+
+In order to fine tune the behavior of the SGs interface the user also has
+control over the relevant timers (`ts5`, `ts6-2`, `ts7`, `ts11`, `ts14`, 
`ts15`)
+and counters (`ns7`, `ns11`). Each timer and counter has to be configured
+separately. In the following example we change the value of ts and ns11.
+
+
+sgs
+ timer ts7 23
+ counter ns11 100
+
+
+
+[NOTE]
+
+In case multiple instances of OsmoMSC run in parallel, it is advised to use a
+different `vlr-name` for each instance. In any case it must be ensured that the
+SGs interface of each instance is bound to a different IP address and/or port.
+
+
+=== Connection monitoring
+
+The user can use the VTY command `show sgs-connections` to list the MMEs that
+are currently connected to OsmoMSC.
diff --git a/doc/manuals/osmomsc-usermanual.adoc 
b/doc/manuals/osmomsc-usermanual.adoc
index ad55e53..45be140 100644
--- a/doc/manuals/osmomsc-usermanual.adoc
+++ b/doc/manuals/osmomsc-usermanual.adoc
@@ -38,6 +38,8 @@

 include::./common/chapters/mgwpool.adoc[]

+include::{srcdir}/chapters/sgs.adoc[]
+
 include::./common/chapters/control_if.adoc[]

 include::./common/chapters/gsup.adoc[]

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ic7c17511ee19cb7f6d5069b27beb661ecb4b0be8
Gerrit-Change-Number: 34870
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[M] Change in osmo-msc[master]: manuals: add section about the SGs interface.

2023-11-01 Thread laforge
Attention is currently required from: dexter, pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-msc/+/34870?usp=email )

Change subject: manuals: add section about the SGs interface.
..


Patch Set 2: Code-Review+2


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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ic7c17511ee19cb7f6d5069b27beb661ecb4b0be8
Gerrit-Change-Number: 34870
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 16:11:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: PCUIF: upgrade to PCUIF v12

2023-11-01 Thread dexter
Attention is currently required from: dexter.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34934?usp=email

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

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: PCUIF: upgrade to PCUIF v12
..

PCUIF: upgrade to PCUIF v12

Related: OS#6191
Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Change-Id: Ib1516e66c70f021adee49f41bd707803fc06f9cf
---
M bts/BTS_Tests.default
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests.default
M pcu/PCU_Tests_SNS.cfg
M pcu/PCU_Tests_SNSv6.cfg
5 files changed, 19 insertions(+), 6 deletions(-)


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib1516e66c70f021adee49f41bd707803fc06f9cf
Gerrit-Change-Number: 34934
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter 
Gerrit-MessageType: newpatchset


[M] Change in osmo-bts[master]: pcuif_proto: signal BTS model via PCUIF

2023-11-01 Thread laforge
Attention is currently required from: dexter, osmith, pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/34648?usp=email )

Change subject: pcuif_proto: signal BTS model via PCUIF
..


Patch Set 8: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34648?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
Gerrit-Change-Number: 34648
Gerrit-PatchSet: 8
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 15:58:49 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in pysim[master]: runtime: refactor file selection methods select and select_file

2023-11-01 Thread laforge
Attention is currently required from: dexter, fixeria.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34932?usp=email )

Change subject: runtime: refactor file selection methods select and select_file
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2
Gerrit-Change-Number: 34932
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 15:58:28 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: PCUIF: upgrade to PCUIF v12

2023-11-01 Thread dexter
dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34934?usp=email )


Change subject: PCUIF: upgrade to PCUIF v12
..

PCUIF: upgrade to PCUIF v12

Related: OS#6191
Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Change-Id: Ib1516e66c70f021adee49f41bd707803fc06f9cf
---
M bts/BTS_Tests.default
M library/PCUIF_Types.ttcn
M pcu/PCU_Tests.default
M pcu/PCU_Tests_SNS.cfg
M pcu/PCU_Tests_SNSv6.cfg
5 files changed, 19 insertions(+), 6 deletions(-)



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

diff --git a/bts/BTS_Tests.default b/bts/BTS_Tests.default
index 7c5230b..578aa36 100644
--- a/bts/BTS_Tests.default
+++ b/bts/BTS_Tests.default
@@ -29,7 +29,7 @@

 [MODULE_PARAMETERS]
 Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBTS";
-PCUIF_Types.mp_pcuif_version := 11;
+PCUIF_Types.mp_pcuif_version := 12;

 # Configuration for each individual transceiver
 BTS_Tests.mp_trx_pars := {
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 8fb0be3..84e7b8d 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -17,7 +17,7 @@

 modulepar {
/* PCUIF version supported by the IUT */
-   PCUIF_Version mp_pcuif_version := 11;
+   PCUIF_Version mp_pcuif_version := 12;
 };

 const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts";
@@ -200,7 +200,9 @@
record length(2) of uint16_tnsvci,
record length(2) of uint16_tlocal_port,
record length(2) of uint16_tremote_port,
-   PCUIF_RemoteAddrremote_addr
+   PCUIF_RemoteAddrremote_addr,
+
+   uint8_t bts_model,
 } with { variant "" };

 type enumerated PCUIF_AddrType {
diff --git a/pcu/PCU_Tests.default b/pcu/PCU_Tests.default
index 07d1ffc..c72720b 100644
--- a/pcu/PCU_Tests.default
+++ b/pcu/PCU_Tests.default
@@ -29,7 +29,7 @@
}
 };
 Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoPCU";
-PCUIF_Types.mp_pcuif_version := 11;
+PCUIF_Types.mp_pcuif_version := 12;

 [TESTPORT_PARAMETERS]
 *.PCU.socket_type := "SEQPACKET"
diff --git a/pcu/PCU_Tests_SNS.cfg b/pcu/PCU_Tests_SNS.cfg
index c7c5771..bd0875b 100644
--- a/pcu/PCU_Tests_SNS.cfg
+++ b/pcu/PCU_Tests_SNS.cfg
@@ -54,7 +54,7 @@
}
}
 }
-PCUIF_Types.mp_pcuif_version := 11
+PCUIF_Types.mp_pcuif_version := 12

 [TESTPORT_PARAMETERS]

diff --git a/pcu/PCU_Tests_SNSv6.cfg b/pcu/PCU_Tests_SNSv6.cfg
index 02d04f3..3093c2c 100644
--- a/pcu/PCU_Tests_SNSv6.cfg
+++ b/pcu/PCU_Tests_SNSv6.cfg
@@ -26,7 +26,7 @@
}
}
 }
-PCUIF_Types.mp_pcuif_version := 11
+PCUIF_Types.mp_pcuif_version := 12

 [TESTPORT_PARAMETERS]


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ib1516e66c70f021adee49f41bd707803fc06f9cf
Gerrit-Change-Number: 34934
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-MessageType: newchange


[M] Change in osmo-bts[master]: pcuif_proto: signal BTS model via PCUIF

2023-11-01 Thread dexter
Attention is currently required from: dexter, laforge, osmith, pespin.

Hello Jenkins Builder, laforge, pespin,

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

https://gerrit.osmocom.org/c/osmo-bts/+/34648?usp=email

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

The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified-1 by Jenkins Builder


Change subject: pcuif_proto: signal BTS model via PCUIF
..

pcuif_proto: signal BTS model via PCUIF

At the moment the PCU has no way of knowing with which BTS model it is
used with. However, some BTS models may require slightly different
behaviour by the PCU, depending on which BTS model is used. So, lets add
an additional bts_model field to struct gsm_pcu_if_info_ind in order to
convey the exact BTS model to the PCU.

Related: OS#6191
Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
---
M include/osmo-bts/pcuif_proto.h
M src/common/pcu_sock.c
2 files changed, 51 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/48/34648/8
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34648?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
Gerrit-Change-Number: 34648
Gerrit-PatchSet: 8
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: dexter 
Gerrit-MessageType: newpatchset


[M] Change in pysim[master]: runtime: refactor file selection methods select and select_file

2023-11-01 Thread dexter
Attention is currently required from: fixeria, laforge.

Hello Jenkins Builder, fixeria, laforge,

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

https://gerrit.osmocom.org/c/pysim/+/34932?usp=email

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

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: runtime: refactor file selection methods select and select_file
..

runtime: refactor file selection methods select and select_file

The implementation of the methods select and select_file of class
RuntimeLchan is a bit complex. We access the card directly in several
places which makes it difficult to track the state changes. We should
clean this up so that we call self.rs.card.select_adf_by_aid/
self.scc.select_file from a single place only.

This means that the method select uses the method select_file. This
results in a much cleaner implementation. We also should take care
that the important states that we track (selected_file, selected_adf,
etc.) are updated by a single private method. Since the update always
must happen after a select _select_post is a good place to do this.

Related: OS#6210
Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2
---
M pySim/runtime.py
1 file changed, 89 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/32/34932/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2
Gerrit-Change-Number: 34932
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


[M] Change in pysim[master]: runtime: refactor file selection methods select and select_file

2023-11-01 Thread dexter
Attention is currently required from: fixeria, laforge.

dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34932?usp=email )

Change subject: runtime: refactor file selection methods select and select_file
..


Patch Set 2:

(4 comments)

File pySim/runtime.py:

https://gerrit.osmocom.org/c/pysim/+/34932/comment/965df6aa_a206d527
PS1, Line 174:
> yeah, we've seen this already several times. […]
Done


https://gerrit.osmocom.org/c/pysim/+/34932/comment/b4df4396_b30556bf
PS1, Line 296: CardFile
> `Optional[CardFile]`
Done


https://gerrit.osmocom.org/c/pysim/+/34932/comment/be65dd6f_2e57cdef
PS1, Line 298:
> tabs vs spaces
Done


https://gerrit.osmocom.org/c/pysim/+/34932/comment/41d1b7bd_4c2be2cf
PS1, Line 375:
> tabs vs spaces
Done



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2
Gerrit-Change-Number: 34932
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Wed, 01 Nov 2023 14:53:32 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in pysim[master]: filesystem: fix method build_select_path_to

2023-11-01 Thread dexter
dexter has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34931?usp=email )

Change subject: filesystem: fix method build_select_path_to
..

filesystem: fix method build_select_path_to

The method build_select_path_to chops off the first element of the
current path. This is done to prevent re-selection of the first file in
the current path.

Unfortunately chopping off the first element in the current path does
not work properly in a situation when the current path points to the MF.
This would chop off the first and last element in the list and the for
loop below would run 0 times.

To fix this, let's keep the first element and chop it off from the
resulting path.

Related: OS#5418
Change-Id: Ia521a7ac4c25fd3a2bc8edffdc45ec89ba4b16eb
---
M pySim/filesystem.py
1 file changed, 23 insertions(+), 2 deletions(-)

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




diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 5950ad1..800f2cc 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -143,7 +143,6 @@
 cur_fqpath = self.fully_qualified_path_fobj()
 target_fqpath = target.fully_qualified_path_fobj()
 inter_path = []
-cur_fqpath.pop()  # drop last element (currently selected file, 
doesn't need re-selection
 cur_fqpath.reverse()
 for ce in cur_fqpath:
 inter_path.append(ce)
@@ -153,7 +152,7 @@
 for te2 in target_fqpath[i+1:]:
 inter_path.append(te2)
 # we found our common ancestor
-return inter_path
+return inter_path[1:]
 return None

 def get_mf(self) -> Optional['CardMF']:

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34931?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia521a7ac4c25fd3a2bc8edffdc45ec89ba4b16eb
Gerrit-Change-Number: 34931
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in pysim[master]: runtime: cosmetic: fix formatting of comment

2023-11-01 Thread dexter
dexter has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34930?usp=email )

Change subject: runtime: cosmetic: fix formatting of comment
..

runtime: cosmetic: fix formatting of comment

Change-Id: I4e949a08c1bfab413b82e958a64404390e58148f
---
M pySim/runtime.py
1 file changed, 10 insertions(+), 1 deletion(-)

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




diff --git a/pySim/runtime.py b/pySim/runtime.py
index a54a1b6..8660724 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -241,7 +241,7 @@

 def probe_file(self, fid: str, cmd_app=None):
 """Blindly try to select a file and automatically add a matching file
-   object if the file actually exists."""
+   object if the file actually exists."""
 if not is_hex(fid, 4, 4):
 raise ValueError(
 "Cannot select unknown file by name %s, only hexadecimal 4 
digit FID is allowed" % fid)

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34930?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4e949a08c1bfab413b82e958a64404390e58148f
Gerrit-Change-Number: 34930
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-hnbgw[master]: X31: fix vty doc

2023-11-01 Thread laforge
Attention is currently required from: neels.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34933?usp=email )

Change subject: X31: fix vty doc
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34933?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I75a25f9065bc651e7ba8feda6db03c49a3b75c5e
Gerrit-Change-Number: 34933
Gerrit-PatchSet: 1
Gerrit-Owner: neels 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Wed, 01 Nov 2023 13:43:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in pysim[master]: runtime: fix tracking of selected_adf

2023-11-01 Thread laforge
Attention is currently required from: dexter.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34897?usp=email )

Change subject: runtime: fix tracking of selected_adf
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34897?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4cc0c58ff887422b4f3954d35c8380ddc00baa1d
Gerrit-Change-Number: 34897
Gerrit-PatchSet: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 13:42:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in ...osmo-epdg[master]: s2b: Implement GTPv2C DeleteBearerReq

2023-11-01 Thread laforge
Attention is currently required from: fixeria, lynxis lazus, pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34896?usp=email )

Change subject: s2b: Implement GTPv2C DeleteBearerReq
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34896?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: I1e5af1ead17385d2e494f4c90ffe6455aee850da
Gerrit-Change-Number: 34896
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Wed, 01 Nov 2023 13:41:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in pysim[master]: runtime: refactor file selection methods select and select_file

2023-11-01 Thread laforge
Attention is currently required from: dexter, fixeria.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34932?usp=email )

Change subject: runtime: refactor file selection methods select and select_file
..


Patch Set 1:

(1 comment)

File pySim/runtime.py:

https://gerrit.osmocom.org/c/pysim/+/34932/comment/4549be3a_2151ad5c
PS1, Line 174:
> Tabs should not be mixed with spaces. Please configure your editor to use 
> spaces for *.py.
yeah, we've seen this already several times. This should be done automatically 
by editor config so we don't need to waste review cycles on it.



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2
Gerrit-Change-Number: 34932
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: fixeria 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 13:39:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[S] Change in pysim[master]: filesystem: fix method build_select_path_to

2023-11-01 Thread laforge
Attention is currently required from: dexter.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34931?usp=email )

Change subject: filesystem: fix method build_select_path_to
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34931?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia521a7ac4c25fd3a2bc8edffdc45ec89ba4b16eb
Gerrit-Change-Number: 34931
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 13:37:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: GGSN_Tests: Don't expect Used-Service-Unit AVP in Gy CCR INITIAL

2023-11-01 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34929?usp=email )

Change subject: GGSN_Tests: Don't expect Used-Service-Unit AVP in Gy CCR INITIAL
..

GGSN_Tests: Don't expect Used-Service-Unit AVP in Gy CCR INITIAL

open5gs 125740727e558c7604897eda711d4d40f2906239 changed behavior and is
no longer sending the Used-Service-Unit AVP during INITIAL_REQUEST,
which makes sense since those values should be only initialized and
spec seems to more or less expect it that way, though receiving it at
INITIAL time should be accepted too AFAICT.

Related: https://github.com/open5gs/open5gs/pull/2721
Change-Id: Ia16a86ff10089974e0b5d49e594467fcd437ce7e
---
M ggsn_tests/GGSN_Tests.ttcn
M pgw/PGW_Tests.ttcn
2 files changed, 16 insertions(+), 2 deletions(-)

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




diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn
index 5b1f7a1..d6a0403 100644
--- a/ggsn_tests/GGSN_Tests.ttcn
+++ b/ggsn_tests/GGSN_Tests.ttcn
@@ -534,7 +534,6 @@

tr_AVP_MultipleServicesIndicator,

tr_AVP_Multiple_Services_Credit_Control(content := superset(

tr_AVP_Requested_Service_Unit,
-   
tr_AVP_Used_Service_Unit,

tr_AVP_PCC_3GPP_QoS_Information,

tr_AVP_GI_3GPP_RatType(rat_type)
)),
diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index 182147d..bafabdf 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -363,7 +363,6 @@
tr_AVP_MultipleServicesIndicator,

tr_AVP_Multiple_Services_Credit_Control(content := superset(
tr_AVP_Requested_Service_Unit,
-   tr_AVP_Used_Service_Unit,
tr_AVP_PCC_3GPP_QoS_Information,
tr_AVP_GI_3GPP_RatType(rat_type)
)),

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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia16a86ff10089974e0b5d49e594467fcd437ce7e
Gerrit-Change-Number: 34929
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-ttcn3-hacks[master]: GGSN_Tests: Don't expect Used-Service-Unit AVP in Gy CCR INITIAL

2023-11-01 Thread laforge
Attention is currently required from: pespin.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34929?usp=email )

Change subject: GGSN_Tests: Don't expect Used-Service-Unit AVP in Gy CCR INITIAL
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia16a86ff10089974e0b5d49e594467fcd437ce7e
Gerrit-Change-Number: 34929
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 01 Nov 2023 13:36:20 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[master]: SI10: Fix uninitialized l_bts pointer

2023-11-01 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email )

Change subject: SI10: Fix uninitialized l_bts pointer
..

SI10: Fix uninitialized l_bts pointer

l_bts must be declared outside the for-loop. If the loop is passed with
n_bts set the first time, l_bts is set. If the loop is passed with
n_bts set next time(s), l_bts is used to encode additional neighbor
cell infos.

Related: CID#330310 and CID#330311
Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
---
M src/osmo-bsc/system_information.c
1 file changed, 18 insertions(+), 2 deletions(-)

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




diff --git a/src/osmo-bsc/system_information.c 
b/src/osmo-bsc/system_information.c
index 477e9fa..141a720 100644
--- a/src/osmo-bsc/system_information.c
+++ b/src/osmo-bsc/system_information.c
@@ -1421,7 +1421,7 @@
  const struct gsm_subscriber_connection *conn)
 {
struct bitvec *nbv;
-   struct gsm_bts *s_bts = conn->lchan->ts->trx->bts;
+   struct gsm_bts *s_bts = conn->lchan->ts->trx->bts, *l_bts = NULL;
int i;
bool any_neighbor = false;
int rc;
@@ -1443,7 +1443,7 @@

/* Get up to 32 possible neighbor frequencies that SI10 can refer to. */
for (i = 0; i < 32; i++) {
-   struct gsm_bts *c_bts, *n_bts, *l_bts;
+   struct gsm_bts *c_bts, *n_bts;
struct gsm_subscriber_connection *c;
unsigned int save_cur_bit;
int16_t arfcn;
@@ -1478,6 +1478,7 @@
save_cur_bit = bv.cur_bit;
/* Nth neighbor, so add rest octets with 
differential cell info. */
LOGP(DRR, LOGL_INFO, "Append cell ID %d to SI 
10.\n", n_bts->cell_identity);
+   OSMO_ASSERT(l_bts);
rc = si10_rest_octets_encode_other(s_bts, , 
l_bts, n_bts, last_i, i);
if (rc < 0) {
LOGP(DRR, LOGL_INFO, "Skip cell ID %d, 
SI 10 would overflow.\n",

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
Gerrit-Change-Number: 34920
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


[S] Change in osmo-bsc[master]: SI10: Fix uninitialized l_bts pointer

2023-11-01 Thread laforge
Attention is currently required from: jolly.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email )

Change subject: SI10: Fix uninitialized l_bts pointer
..


Patch Set 2: Code-Review+2

(1 comment)

File src/osmo-bsc/system_information.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/34920/comment/e63403a1_ec8afc80
PS1, Line 1424: struct gsm_bts *s_bts = conn->lchan->ts->trx->bts, 
*l_bts;
> As described in the commit message, l_bts will be set before calling 
> si10_rest_octets_encode_other. […]
ah, indeed. any_neighbor is false in the first iterateion, at whose end we are 
setting l_bts and then in a subsequent iteration it must be non-null.



--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
Gerrit-Change-Number: 34920
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Wed, 01 Nov 2023 13:36:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: jolly 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[S] Change in osmo-ttcn3-hacks[master]: GGSN_Tests: Don't expect Used-Service-Unit AVP in Gy CCR INITIAL

2023-11-01 Thread fixeria
Attention is currently required from: pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34929?usp=email )

Change subject: GGSN_Tests: Don't expect Used-Service-Unit AVP in Gy CCR INITIAL
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia16a86ff10089974e0b5d49e594467fcd437ce7e
Gerrit-Change-Number: 34929
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Wed, 01 Nov 2023 11:19:30 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[master]: SI10: Fix uninitialized l_bts pointer

2023-11-01 Thread fixeria
Attention is currently required from: jolly, laforge.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email )

Change subject: SI10: Fix uninitialized l_bts pointer
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
Gerrit-Change-Number: 34920
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: laforge 
Gerrit-Attention: jolly 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 01 Nov 2023 09:50:57 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in osmo-ttcn3-hacks[master]: sccp: Introduce test TC_cr_timeout_cc_too_late

2023-11-01 Thread fixeria
Attention is currently required from: daniel, osmith, pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923?usp=email )

Change subject: sccp: Introduce test TC_cr_timeout_cc_too_late
..


Patch Set 2:

(2 comments)

Patchset:

PS2:
> For some reason this builds locally fine, but fails here or in docker: […]
Where this function is coming from? Neither I can find it in 
osmo-ttcn3-hacks.git, nor in the `deps` subdir. Most likely, you added it to 
`titan.ProtocolEmulations.SCCP` locally?


File library/SCCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923/comment/bf34b5ac_2d9e2868
PS2, Line 137: function
why using a wrapper function? why not `template (value)`?



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

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If4b53565f1fa19894ca24fa71e02ae7b1941411e
Gerrit-Change-Number: 34923
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Wed, 01 Nov 2023 09:49:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[M] Change in pysim[master]: runtime: refactor file selection methods select and select_file

2023-11-01 Thread fixeria
Attention is currently required from: dexter, laforge.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34932?usp=email )

Change subject: runtime: refactor file selection methods select and select_file
..


Patch Set 1:

(4 comments)

File pySim/runtime.py:

https://gerrit.osmocom.org/c/pysim/+/34932/comment/67d5d0a2_2a4e2b04
PS1, Line 174:
Tabs should not be mixed with spaces. Please configure your editor to use 
spaces for *.py.


https://gerrit.osmocom.org/c/pysim/+/34932/comment/b7c3a251_b80da082
PS1, Line 296: CardFile
`Optional[CardFile]`


https://gerrit.osmocom.org/c/pysim/+/34932/comment/b2f4ed6d_e27573d6 
PS1, Line 298:
tabs vs spaces


https://gerrit.osmocom.org/c/pysim/+/34932/comment/db0bba04_ab29f17c
PS1, Line 375:
tabs vs spaces



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2
Gerrit-Change-Number: 34932
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 09:37:23 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in pysim[master]: filesystem: fix method build_select_path_to

2023-11-01 Thread fixeria
Attention is currently required from: dexter, laforge.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34931?usp=email )

Change subject: filesystem: fix method build_select_path_to
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34931?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia521a7ac4c25fd3a2bc8edffdc45ec89ba4b16eb
Gerrit-Change-Number: 34931
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 09:30:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in pysim[master]: runtime: cosmetic: fix formatting of comment

2023-11-01 Thread fixeria
Attention is currently required from: dexter, laforge.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34930?usp=email )

Change subject: runtime: cosmetic: fix formatting of comment
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34930?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4e949a08c1bfab413b82e958a64404390e58148f
Gerrit-Change-Number: 34930
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Wed, 01 Nov 2023 09:29:10 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-bsc[master]: SI10: Fix uninitialized l_bts pointer

2023-11-01 Thread jolly
Attention is currently required from: laforge.

jolly has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email )

Change subject: SI10: Fix uninitialized l_bts pointer
..


Patch Set 1:

(1 comment)

File src/osmo-bsc/system_information.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/34920/comment/7c9b7ab8_bb2ba35f
PS1, Line 1424: struct gsm_bts *s_bts = conn->lchan->ts->trx->bts, 
*l_bts;
> are you sure you don't need to NULL-intitialize it?  At first sight it looks 
> like it's possible to c […]
As described in the commit message, l_bts will be set before calling 
si10_rest_octets_encode_other.

To make it clearer, I initialize l_bts with NULL and use OSMO_ASSERT(l_bts) to 
show/check if the pointer is set.



--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
Gerrit-Change-Number: 34920
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 01 Nov 2023 09:07:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[S] Change in osmo-bsc[master]: SI10: Fix uninitialized l_bts pointer

2023-11-01 Thread jolly
Attention is currently required from: jolly.

Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email

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

The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder


Change subject: SI10: Fix uninitialized l_bts pointer
..

SI10: Fix uninitialized l_bts pointer

l_bts must be declared outside the for-loop. If the loop is passed with
n_bts set the first time, l_bts is set. If the loop is passed with
n_bts set next time(s), l_bts is used to encode additional neighbor
cell infos.

Related: CID#330310 and CID#330311
Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
---
M src/osmo-bsc/system_information.c
1 file changed, 18 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/20/34920/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34920?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I9dbbd066075f9ccb331616a2b59b46b1b44c8b4c
Gerrit-Change-Number: 34920
Gerrit-PatchSet: 2
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Attention: jolly 
Gerrit-MessageType: newpatchset