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

2023-11-02 Thread fixeria
Attention is currently required from: laforge.

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

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


Patch Set 3: Code-Review+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: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 03 Nov 2023 05:59:24 +
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-02 Thread fixeria
Attention is currently required from: 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 3:

(1 comment)

File library/SCCP_Templates.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923/comment/d1394c82_7c2df04d
PS3, Line 120: calling_enc
Now why this template becomes a function? I may be missing something, but to me 
it looks like there is no need to turn this template into a function. Otherwise 
a comment explaining why would be welcome.



--
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: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 03 Nov 2023 05:42:00 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


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

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

daniel 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 3: Code-Review+1


--
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: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 03 Nov 2023 05:04:42 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in pysim[master]: pySim-shell: Move init_card() function to new pySim.app module

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


Change subject: pySim-shell: Move init_card() function to new pySim.app module
..

pySim-shell: Move init_card() function to new pySim.app module

The point of this is to move generic code out of pySim-shell.py,
paving the way for more/other executables using the full power of
our class model without having to reinvent the wheel.

Change-Id: Icf557ed3064ef613ed693ce28bd3514a97a938bd
---
M pySim-shell.py
A pySim/app.py
2 files changed, 132 insertions(+), 94 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/56/34956/1

diff --git a/pySim-shell.py b/pySim-shell.py
index 0c559f9..795276a 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -2,7 +2,7 @@

 # Interactive shell for working with SIM / UICC / USIM / ISIM cards
 #
-# (C) 2021-2022 by Harald Welte 
+# (C) 2021-2023 by Harald Welte 
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -48,111 +48,20 @@
 from pprint import pprint as pp

 from pySim.exceptions import *
-from pySim.commands import SimCardCommands
 from pySim.transport import init_reader, ApduTracer, argparse_add_reader_args, 
ProactiveHandler
-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, is_decimal
 from pySim.card_handler import CardHandler, CardHandlerAuto

-from pySim.filesystem import CardDF, CardADF, CardModel, CardApplication
-from pySim.runtime import RuntimeState
-from pySim.profile import CardProfile
-from pySim.cdma_ruim import CardProfileRUIM
-from pySim.ts_102_221 import CardProfileUICC
+from pySim.filesystem import CardDF, CardADF
 from pySim.ts_102_222 import Ts10Commands
 from pySim.gsm_r import DF_EIRENE
 from pySim.cat import ProactiveCommand

-# we need to import this module so that the SysmocomSJA2 sub-class of
-# CardModel is created, which will add the ATR-based matching and
-# calling of SysmocomSJA2.add_files.  See  CardModel.apply_matching_models
-import pySim.sysmocom_sja2
-
-# we need to import these modules so that the various sub-classes of
-# CardProfile are created, which will be used in init_card() to iterate
-# over all known CardProfile sub-classes.
-import pySim.ts_31_102
-import pySim.ts_31_103
-import pySim.ts_31_104
-import pySim.ara_m
-import pySim.global_platform
-import pySim.euicc
-
 from pySim.card_key_provider import CardKeyProviderCsv, 
card_key_provider_register, card_key_provider_get_field

-
-def init_card(sl):
-"""
-Detect card in reader and setup card profile and runtime state. This
-function must be called at least once on startup. The card and runtime
-state object (rs) is required for all pySim-shell commands.
-"""
-
-# Create command layer
-scc = SimCardCommands(transport=sl)
-
-# Wait up to three seconds for a card in reader and try to detect
-# the card type.
-print("Waiting for card...")
-try:
-sl.wait_for_card(3)
-except NoCardError:
-print("No card detected!")
-return None, None
-except:
-print("Card not readable!")
-return None, None
-
-generic_card = False
-card = card_detect(scc)
-if card is None:
-print("Warning: Could not detect card type - assuming a generic card 
type...")
-card = SimCardBase(scc)
-generic_card = True
-
-profile = CardProfile.pick(scc)
-if profile is None:
-print("Unsupported card type!")
-return None, card
-
-# ETSI TS 102 221, Table 9.3 specifies a default for the PIN key
-# references, however card manufactures may still decide to pick an
-# arbitrary key reference. In case we run on a generic card class that is
-# detected as an UICC, we will pick the key reference that is officially
-# specified.
-if generic_card and isinstance(profile, CardProfileUICC):
-card._adm_chv_num = 0x0A
-
-print("Info: Card is of type: %s" % str(profile))
-
-# FIXME: this shouldn't really be here but somewhere else/more generic.
-# We cannot do it within pySim/profile.py as that would create circular
-# dependencies between the individual profiles and profile.py.
-if isinstance(profile, CardProfileUICC):
-for app_cls in CardApplication.__subclasses__():
-constr_sig = inspect.signature(app_cls.__init__)
-# skip any intermediary sub-classes such as CardApplicationSD
-if len(constr_sig.parameters) != 1:
-continue
-profile.add_application(app_cls())
-# We have chosen SimCard() above, 

[M] Change in pysim[master]: Use construct 'Flag' instead of 'Bit' for type descriptions

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


Change subject: Use construct 'Flag' instead of 'Bit' for type descriptions
..

Use construct 'Flag' instead of 'Bit' for type descriptions

It's better for the human reader (and more obvious that it's a boolean
value) if we decode single Bits as True/False instead of 1/0.

Change-Id: Ib025f9c4551af7cf57090a0678ab0f66a6684fa4
---
M pySim/sysmocom_sja2.py
M pySim/ts_31_102.py
2 files changed, 32 insertions(+), 19 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/57/34957/1

diff --git a/pySim/sysmocom_sja2.py b/pySim/sysmocom_sja2.py
index bd9e8a8..8073e74 100644
--- a/pySim/sysmocom_sja2.py
+++ b/pySim/sysmocom_sja2.py
@@ -140,14 +140,14 @@
 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":
+  {"cfg": {"use_sres_deriv_func_2": False, "use_opc_instead_of_op": 
True, "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),
-'use_sres_deriv_func_2'/Bit,
-'use_opc_instead_of_op'/Bit,
+'use_sres_deriv_func_2'/Flag,
+'use_opc_instead_of_op'/Flag,
 'algorithm'/Enum(Nibble, milenage=4, comp128v1=1, 
comp128v2=2, comp128v3=3))
 self._construct = Struct('cfg'/CfgByte,
  'key'/HexAdapter(Bytes(16)),
@@ -181,19 +181,19 @@
 class EF_USIM_SQN(TransparentEF):
 _test_de_encode = [
 ( 
'd50300020002',
-  {"flag1": {"skip_next_sqn_check": 1, "delta_max_check": 1, 
"age_limit_check": 0, "sqn_check": 1,
- "ind_len": 5}, "flag2": {"rfu": 0, 
"dont_clear_amf_for_macs": 0, "aus_concealed": 1,
-  "autn_concealed": 1}, 
"delta_max": 8589934592, "age_limit":
+  {"flag1": {"skip_next_sqn_check": True, "delta_max_check": True, 
"age_limit_check": False, "sqn_check": True,
+ "ind_len": 5}, "flag2": {"rfu": 0, 
"dont_clear_amf_for_macs": False, "aus_concealed": True,
+  "autn_concealed": True}, 
"delta_max": 8589934592, "age_limit":
8589934592, "freshness": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  0, 0, 0, 0, 0, 0, 0, 0]} ),
   ]
 def __init__(self, fid='af30', name='EF.USIM_SQN'):
 super().__init__(fid, name=name, desc='SQN parameters for AKA')
-Flag1 = BitStruct('skip_next_sqn_check'/Bit, 'delta_max_check'/Bit,
-  'age_limit_check'/Bit, 'sqn_check'/Bit,
+Flag1 = BitStruct('skip_next_sqn_check'/Flag, 'delta_max_check'/Flag,
+  'age_limit_check'/Flag, 'sqn_check'/Flag,
   'ind_len'/BitsInteger(4))
-Flag2 = BitStruct('rfu'/BitsRFU(5), 'dont_clear_amf_for_macs'/Bit,
-  'aus_concealed'/Bit, 'autn_concealed'/Bit)
+Flag2 = BitStruct('rfu'/BitsRFU(5), 'dont_clear_amf_for_macs'/Flag,
+  'aus_concealed'/Flag, 'autn_concealed'/Flag)
 self._construct = Struct('flag1'/Flag1, 'flag2'/Flag2,
  'delta_max' /
  BytesInteger(6), 'age_limit'/BytesInteger(6),
@@ -204,8 +204,8 @@
 def __init__(self, fid='af20', name='EF.USIM_AUTH_KEY'):
 super().__init__(fid, name=name, desc='USIM authentication key')
 Algorithm = Enum(Nibble, milenage=4, sha1_aka=5, tuak=6, xor=15)
-CfgByte = BitStruct(Padding(1), 'only_4bytes_res_in_3g'/Bit,
-'sres_deriv_func_2_in_3g'/Mapping(Bit, {1:0, 2:1}),
+CfgByte = BitStruct(Padding(1), 'only_4bytes_res_in_3g'/Flag,
+'sres_deriv_func_2_in_3g'/Mapping(Bit, {1:False, 
2:True}),
 'use_opc_instead_of_op'/Mapping(Bit, {False:0, 
True:1}),
 'algorithm'/Algorithm)
 self._construct = 

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

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

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

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


Patch Set 2:

(1 comment)

File pySim/utils.py:

https://gerrit.osmocom.org/c/pysim/+/34946/comment/75ddfb44_d8428a9d
PS1, Line 1476: if not all(c in string.hexdigits for c in instr):
> you can probably return is_hexstr here.
nice idea, but the error strings would then be potentially confusing.  Like 
getting "Input must be hexadecimal" when calling is_hexstr_or_decimal, which 
currently states "Input must be [hexa]decimal"...



--
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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:46:04 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


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

2023-11-02 Thread laforge
laforge has submitted this change. ( 
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(-)

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




diff --git a/docs/shell.rst b/docs/shell.rst
index ab67738..81e84d2 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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


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

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

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

pySim-shell: Use argparser 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(-)

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




diff --git a/docs/shell.rst b/docs/shell.rst
index f437495..d8c0967 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: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


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

2023-11-02 Thread laforge
laforge has submitted this change. ( 
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(-)

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




diff --git a/docs/shell.rst b/docs/shell.rst
index 81e84d2..f437495 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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


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

2023-11-02 Thread laforge
laforge has submitted this change. ( 
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(-)

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




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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


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

2023-11-02 Thread laforge
laforge has submitted this change. ( 
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(-)

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




diff --git a/docs/shell.rst b/docs/shell.rst
index 12c0493..13d71bb 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 

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

2023-11-02 Thread laforge
laforge has submitted this change. ( 
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(-)

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




diff --git a/docs/shell.rst b/docs/shell.rst
index 13d71bb..ab67738 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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


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

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

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

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


Patch Set 3: Code-Review+2


--
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: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:42:56 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2023-11-02 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34943?usp=email )

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


Patch Set 2: Code-Review+2


--
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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:42:48 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2023-11-02 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34942?usp=email )

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


Patch Set 2: Code-Review+2


--
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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:42:44 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2023-11-02 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34939?usp=email )

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


Patch Set 2: Code-Review+2


--
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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:42:33 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2023-11-02 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34940?usp=email )

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


Patch Set 2: Code-Review+2


--
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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:42:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2023-11-02 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34938?usp=email )

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


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34938?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: I11e66757f10cc28fda547244ae09d51dacd70824
Gerrit-Change-Number: 34938
Gerrit-PatchSet: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 23:42:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 3:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/pysim/+/34944/comment/295f1204_cfedb8e4
PS1, Line 7: pySim-shell: Use arparser for verify_adm to support --help
> argparser
Done



--
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: 3
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:46:54 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


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

2023-11-02 Thread laforge
laforge has submitted this change. ( 
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(-)

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




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-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


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

2023-11-02 Thread laforge
laforge has submitted this change. ( 
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(-)

Approvals:
  laforge: Looks good to me, approved; Verified




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

-FIXME
+As pySim-shell is built upon ``cmd2``, 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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: merged


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

2023-11-02 Thread laforge
laforge has submitted this change. ( 
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(-)

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




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-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


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

2023-11-02 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34937?usp=email )

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


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


--
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: 2
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:44:55 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2023-11-02 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34936?usp=email )

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


Patch Set 1: Code-Review+2


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:44:20 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2023-11-02 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/34935?usp=email )

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


Patch Set 1: Code-Review+2


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:44:16 +
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-02 Thread laforge
Attention is currently required from: neels.

laforge 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: Code-Review+2


--
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-Reviewer: pespin 
Gerrit-CC: dexter 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:43:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-hnbgw[master]: context_map_sccp: Fix assert hit due to missing ev handling

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

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

Change subject: context_map_sccp: Fix assert hit due to missing ev handling
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34950?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: Idaad11eaa3c2e56de792f80bab1f1d8435ef9b68
Gerrit-Change-Number: 34950
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:42:38 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-hnbgw[master]: context_map_sccp: Fix assert hit due to missing ev handling

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

Change subject: context_map_sccp: Fix assert hit due to missing ev handling
..

context_map_sccp: Fix assert hit due to missing ev handling

This was being triggered recently by
HNBGW_Tests.TC_ranap_cs_mo_disconnect in osmo-ttcn3-hacks.git.

Change-Id: Idaad11eaa3c2e56de792f80bab1f1d8435ef9b68
---
M src/osmo-hnbgw/context_map_sccp.c
1 file changed, 13 insertions(+), 0 deletions(-)

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




diff --git a/src/osmo-hnbgw/context_map_sccp.c 
b/src/osmo-hnbgw/context_map_sccp.c
index 9b4837d..4a78337 100644
--- a/src/osmo-hnbgw/context_map_sccp.c
+++ b/src/osmo-hnbgw/context_map_sccp.c
@@ -452,6 +452,7 @@
handle_rx_sccp(fi, ranap_msg);
return;

+   case MAP_SCCP_EV_RAN_LINK_LOST:
case MAP_SCCP_EV_USER_ABORT:
case MAP_SCCP_EV_CN_LINK_LOST:
/* Stop waiting for RLSD, send RLSD now. */

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34950?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: Idaad11eaa3c2e56de792f80bab1f1d8435ef9b68
Gerrit-Change-Number: 34950
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-MessageType: merged


[S] Change in osmo-ci[master]: repo-install-test: ignore limesuite-images

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

Change subject: repo-install-test: ignore limesuite-images
..

repo-install-test: ignore limesuite-images

Don't attempt to install limesuite-images. It runs a post-install script
that downloads files from an external server and fails currently, as
there are no images for 23.10. While we have limesuite-images packages
in our OBS repository, this is just a side-effect of building limesuite.
What we are really interested in is liblimesuite for osmo-trx, as I
understand.

Add --no-install-recommends to the apt-get install line in
install_repo_packages_debian, because the main limesuite package has
limesuite-images in recommends and would pull it in otherwise.

Change-Id: I237408c805977c831f352a57a301ea45753d1ac1
---
M scripts/repo-install-test/blacklist_debian10.txt
M scripts/repo-install-test/blacklist_debian11.txt
M scripts/repo-install-test/blacklist_debian12.txt
M scripts/repo-install-test/run-inside.sh
4 files changed, 29 insertions(+), 1 deletion(-)

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




diff --git a/scripts/repo-install-test/blacklist_debian10.txt 
b/scripts/repo-install-test/blacklist_debian10.txt
index 6570de6..93dac75 100644
--- a/scripts/repo-install-test/blacklist_debian10.txt
+++ b/scripts/repo-install-test/blacklist_debian10.txt
@@ -19,6 +19,10 @@
 osmocom-nitb
 osmocom-nitb-dbg

+# Not relevant for the test
+limesuite-images
+limesuite-images23.10
+
 # SoapySDR is not used anymore (see OS#3542)
 soapysdr-module-lms7
 soapysdr0.6-module-lms7
diff --git a/scripts/repo-install-test/blacklist_debian11.txt 
b/scripts/repo-install-test/blacklist_debian11.txt
index 53187dc..c962ffc 100644
--- a/scripts/repo-install-test/blacklist_debian11.txt
+++ b/scripts/repo-install-test/blacklist_debian11.txt
@@ -31,6 +31,8 @@
 libulfius2.7-dbgsym
 libyder2.0-dbgsym
 limesuite-dbgsym
+limesuite-images
+limesuite-images23.10
 soapysdr0.7-module-lms7-dbgsym

 # Depends on specific verions 0.5.4.38.0847 of rtl-sdr, which we won't install
diff --git a/scripts/repo-install-test/blacklist_debian12.txt 
b/scripts/repo-install-test/blacklist_debian12.txt
index b470d44..9b5f5e7 100644
--- a/scripts/repo-install-test/blacklist_debian12.txt
+++ b/scripts/repo-install-test/blacklist_debian12.txt
@@ -32,6 +32,8 @@
 libulfius2.7-dbgsym
 libyder2.0-dbgsym
 limesuite-dbgsym
+limesuite-images
+limesuite-images23.10
 soapysdr0.7-module-lms7
 soapysdr0.7-module-lms7-dbgsym
 soapysdr-module-lms7
diff --git a/scripts/repo-install-test/run-inside.sh 
b/scripts/repo-install-test/run-inside.sh
index e08338f..d7730ff 100755
--- a/scripts/repo-install-test/run-inside.sh
+++ b/scripts/repo-install-test/run-inside.sh
@@ -329,7 +329,7 @@
cat osmocom_packages_all.txt

filter_packages_txt
-   apt install -y $(cat osmocom_packages.txt)
+   apt-get install -y --no-install-recommends $(cat osmocom_packages.txt)
 }

 install_repo_packages_centos() {

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I237408c805977c831f352a57a301ea45753d1ac1
Gerrit-Change-Number: 34955
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-ci[master]: repo-install-test: fix ca-certificates-java error

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

Change subject: repo-install-test: fix ca-certificates-java error
..

repo-install-test: fix ca-certificates-java error

The repo-install-test started to fail on debian 10 with the following
error. Apparently this happens when installing ca-certificates-java
after installing java. Add a workaround.

  Setting up ca-certificates-java (20190405) ...
  head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or 
directory
  Exception in thread "main" java.lang.InternalError: Error loading 
java.security file

Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
---
M scripts/repo-install-test/run-inside.sh
1 file changed, 20 insertions(+), 1 deletion(-)

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




diff --git a/scripts/repo-install-test/run-inside.sh 
b/scripts/repo-install-test/run-inside.sh
index b45d76d..e08338f 100755
--- a/scripts/repo-install-test/run-inside.sh
+++ b/scripts/repo-install-test/run-inside.sh
@@ -185,8 +185,10 @@

case "$DISTRO" in
debian10)
-   # Can't access https://osmocom.org otherwise
+   # libgnutls30: can't access https://osmocom.org 
otherwise
+   # ca-certificates-java: fails if installed after java
apt-get install -y --no-install-recommends \
+   ca-certificates-java \
libgnutls30
;;
esac

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
Gerrit-Change-Number: 34954
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-ci[master]: repo-install-test: fix ca-certificates-java error

2023-11-02 Thread laforge
Attention is currently required from: osmith.

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

Change subject: repo-install-test: fix ca-certificates-java error
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
Gerrit-Change-Number: 34954
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:42:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: repo-install-test: ignore limesuite-images

2023-11-02 Thread laforge
Attention is currently required from: osmith.

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

Change subject: repo-install-test: ignore limesuite-images
..


Patch Set 1: Code-Review+2


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I237408c805977c831f352a57a301ea45753d1ac1
Gerrit-Change-Number: 34955
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:42:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

Change subject: add mgcp_conn_rtp_type_names[]
..


Patch Set 1: Code-Review+2


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:41:47 +
Gerrit-HasComments: No
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-02 Thread laforge
Attention is currently required from: dexter, keith, neels, osmith.

laforge 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 4: Code-Review+2


--
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: 4
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: keith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: keith 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 02 Nov 2023 21:41:32 +
Gerrit-HasComments: No
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-02 Thread pespin
Attention is currently required from: dexter, keith, neels, osmith.

pespin 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 4: Code-Review+2


--
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: 4
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: keith 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: keith 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 02 Nov 2023 19:25:39 +
Gerrit-HasComments: No
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-02 Thread keith
Attention is currently required from: dexter, neels, osmith, pespin.

keith 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 4: Code-Review+1

(1 comment)

File src/libosmo-mgcp/mgcp_conn.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/34150/comment/3e112894_625f9a83
PS3, Line 363:  if (!conn) {
> unneeded {}
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: 4
Gerrit-Owner: keith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: keith 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 02 Nov 2023 18:47:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


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

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

keith 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)

Patchset:

PS3:
Thanks for dealing with this! Dropping the RTCP port is good, as is the C vs 0x 
part.



--
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: keith 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 02 Nov 2023 18:42:53 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: repo-install-test: ignore limesuite-images

2023-11-02 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/34955?usp=email )

Change subject: repo-install-test: ignore limesuite-images
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I237408c805977c831f352a57a301ea45753d1ac1
Gerrit-Change-Number: 34955
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Thu, 02 Nov 2023 16:01:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: repo-install-test: fix ca-certificates-java error

2023-11-02 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/34954?usp=email )


Change subject: repo-install-test: fix ca-certificates-java error
..

repo-install-test: fix ca-certificates-java error

The repo-install-test started to fail on debian 10 with the following
error. Apparently this happens when installing ca-certificates-java
after installing java. Add a workaround.

  Setting up ca-certificates-java (20190405) ...
  head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or 
directory
  Exception in thread "main" java.lang.InternalError: Error loading 
java.security file

Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
---
M scripts/repo-install-test/run-inside.sh
1 file changed, 20 insertions(+), 1 deletion(-)



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

diff --git a/scripts/repo-install-test/run-inside.sh 
b/scripts/repo-install-test/run-inside.sh
index b45d76d..e08338f 100755
--- a/scripts/repo-install-test/run-inside.sh
+++ b/scripts/repo-install-test/run-inside.sh
@@ -185,8 +185,10 @@

case "$DISTRO" in
debian10)
-   # Can't access https://osmocom.org otherwise
+   # libgnutls30: can't access https://osmocom.org 
otherwise
+   # ca-certificates-java: fails if installed after java
apt-get install -y --no-install-recommends \
+   ca-certificates-java \
libgnutls30
;;
esac

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
Gerrit-Change-Number: 34954
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-ci[master]: Update git tag patterns for rtl-sdr, osmo-fl2k

2023-11-02 Thread osmith
Attention is currently required from: fixeria.

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/34953?usp=email )

Change subject: Update git tag patterns for rtl-sdr, osmo-fl2k
..


Patch Set 1: Code-Review+2

(1 comment)

Patchset:

PS1:
merging this now, so the release script doesn't re-create releases for the tags 
that don't start with v



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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If1bb64722bd24b0079d2427ea3b0f5b5c87ef7ac
Gerrit-Change-Number: 34953
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 02 Nov 2023 15:59:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: repo-install-test: fix ca-certificates-java error

2023-11-02 Thread pespin
Attention is currently required from: osmith.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/34954?usp=email )

Change subject: repo-install-test: fix ca-certificates-java error
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I00b9c97d9d85fb37ba33a48caa732cd50de99683
Gerrit-Change-Number: 34954
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Comment-Date: Thu, 02 Nov 2023 16:00:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: Update git tag patterns for rtl-sdr, osmo-fl2k

2023-11-02 Thread osmith
osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/34953?usp=email )

Change subject: Update git tag patterns for rtl-sdr, osmo-fl2k
..

Update git tag patterns for rtl-sdr, osmo-fl2k

With the v2.0.0 release of rtl-sdr, it was decided to include the v in
the tag pattern again, so adjust it in the related scripts. Adjust
osmo-fl2k too in the OBS scripts because there the tag pattern was not
set.

Change-Id: If1bb64722bd24b0079d2427ea3b0f5b5c87ef7ac
---
M scripts/common.sh
M scripts/obs/lib/config.py
2 files changed, 17 insertions(+), 1 deletion(-)

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




diff --git a/scripts/common.sh b/scripts/common.sh
index 2bca384..ea106e2 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -80,7 +80,7 @@
local url ret pattern

case "$project" in
-   gapk|osmo-fl2k)
+   gapk|osmo-fl2k|rtl-sdr)
pattern='refs/tags/v[0-9.]*$'
;;
*)
diff --git a/scripts/obs/lib/config.py b/scripts/obs/lib/config.py
index 33aced8..4779d77 100644
--- a/scripts/obs/lib/config.py
+++ b/scripts/obs/lib/config.py
@@ -111,6 +111,8 @@
 git_latest_tag_pattern_other = {
 "limesuite": "^v[0-9]*\\.[0-9]*\\.[0-9]*$",
 "open5gs": "^v[0-9]*\\.[0-9]*\\.[0-9]*$",
+"osmo-fl2k": "^v[0-9]*\\.[0-9]*\\.[0-9]*$",
+"rtl-sdr": "^v[0-9]*\\.[0-9]*\\.[0-9]*$",
 "wireshark": "^v[0-9]*\\.[0-9]*\\.[0-9a-z]*$",
 }


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If1bb64722bd24b0079d2427ea3b0f5b5c87ef7ac
Gerrit-Change-Number: 34953
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


[S] Change in osmo-ci[master]: repo-install-test: ignore limesuite-images

2023-11-02 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/34955?usp=email )


Change subject: repo-install-test: ignore limesuite-images
..

repo-install-test: ignore limesuite-images

Don't attempt to install limesuite-images. It runs a post-install script
that downloads files from an external server and fails currently, as
there are no images for 23.10. While we have limesuite-images packages
in our OBS repository, this is just a side-effect of building limesuite.
What we are really interested in is liblimesuite for osmo-trx, as I
understand.

Add --no-install-recommends to the apt-get install line in
install_repo_packages_debian, because the main limesuite package has
limesuite-images in recommends and would pull it in otherwise.

Change-Id: I237408c805977c831f352a57a301ea45753d1ac1
---
M scripts/repo-install-test/blacklist_debian10.txt
M scripts/repo-install-test/blacklist_debian11.txt
M scripts/repo-install-test/blacklist_debian12.txt
M scripts/repo-install-test/run-inside.sh
4 files changed, 29 insertions(+), 1 deletion(-)



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

diff --git a/scripts/repo-install-test/blacklist_debian10.txt 
b/scripts/repo-install-test/blacklist_debian10.txt
index 6570de6..93dac75 100644
--- a/scripts/repo-install-test/blacklist_debian10.txt
+++ b/scripts/repo-install-test/blacklist_debian10.txt
@@ -19,6 +19,10 @@
 osmocom-nitb
 osmocom-nitb-dbg

+# Not relevant for the test
+limesuite-images
+limesuite-images23.10
+
 # SoapySDR is not used anymore (see OS#3542)
 soapysdr-module-lms7
 soapysdr0.6-module-lms7
diff --git a/scripts/repo-install-test/blacklist_debian11.txt 
b/scripts/repo-install-test/blacklist_debian11.txt
index 53187dc..c962ffc 100644
--- a/scripts/repo-install-test/blacklist_debian11.txt
+++ b/scripts/repo-install-test/blacklist_debian11.txt
@@ -31,6 +31,8 @@
 libulfius2.7-dbgsym
 libyder2.0-dbgsym
 limesuite-dbgsym
+limesuite-images
+limesuite-images23.10
 soapysdr0.7-module-lms7-dbgsym

 # Depends on specific verions 0.5.4.38.0847 of rtl-sdr, which we won't install
diff --git a/scripts/repo-install-test/blacklist_debian12.txt 
b/scripts/repo-install-test/blacklist_debian12.txt
index b470d44..9b5f5e7 100644
--- a/scripts/repo-install-test/blacklist_debian12.txt
+++ b/scripts/repo-install-test/blacklist_debian12.txt
@@ -32,6 +32,8 @@
 libulfius2.7-dbgsym
 libyder2.0-dbgsym
 limesuite-dbgsym
+limesuite-images
+limesuite-images23.10
 soapysdr0.7-module-lms7
 soapysdr0.7-module-lms7-dbgsym
 soapysdr-module-lms7
diff --git a/scripts/repo-install-test/run-inside.sh 
b/scripts/repo-install-test/run-inside.sh
index e08338f..d7730ff 100755
--- a/scripts/repo-install-test/run-inside.sh
+++ b/scripts/repo-install-test/run-inside.sh
@@ -329,7 +329,7 @@
cat osmocom_packages_all.txt

filter_packages_txt
-   apt install -y $(cat osmocom_packages.txt)
+   apt-get install -y --no-install-recommends $(cat osmocom_packages.txt)
 }

 install_repo_packages_centos() {

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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I237408c805977c831f352a57a301ea45753d1ac1
Gerrit-Change-Number: 34955
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-ci[master]: Update git tag patterns for rtl-sdr, osmo-fl2k

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

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/34953?usp=email )

Change subject: Update git tag patterns for rtl-sdr, osmo-fl2k
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If1bb64722bd24b0079d2427ea3b0f5b5c87ef7ac
Gerrit-Change-Number: 34953
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Thu, 02 Nov 2023 14:14:07 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-ci[master]: Update git tag patterns for rtl-sdr, osmo-fl2k

2023-11-02 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/34953?usp=email )


Change subject: Update git tag patterns for rtl-sdr, osmo-fl2k
..

Update git tag patterns for rtl-sdr, osmo-fl2k

With the v2.0.0 release of rtl-sdr, it was decided to include the v in
the tag pattern again, so adjust it in the related scripts. Adjust
osmo-fl2k too in the OBS scripts because there the tag pattern was not
set.

Change-Id: If1bb64722bd24b0079d2427ea3b0f5b5c87ef7ac
---
M scripts/common.sh
M scripts/obs/lib/config.py
2 files changed, 17 insertions(+), 1 deletion(-)



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

diff --git a/scripts/common.sh b/scripts/common.sh
index 2bca384..ea106e2 100644
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -80,7 +80,7 @@
local url ret pattern

case "$project" in
-   gapk|osmo-fl2k)
+   gapk|osmo-fl2k|rtl-sdr)
pattern='refs/tags/v[0-9.]*$'
;;
*)
diff --git a/scripts/obs/lib/config.py b/scripts/obs/lib/config.py
index 33aced8..4779d77 100644
--- a/scripts/obs/lib/config.py
+++ b/scripts/obs/lib/config.py
@@ -111,6 +111,8 @@
 git_latest_tag_pattern_other = {
 "limesuite": "^v[0-9]*\\.[0-9]*\\.[0-9]*$",
 "open5gs": "^v[0-9]*\\.[0-9]*\\.[0-9]*$",
+"osmo-fl2k": "^v[0-9]*\\.[0-9]*\\.[0-9]*$",
+"rtl-sdr": "^v[0-9]*\\.[0-9]*\\.[0-9]*$",
 "wireshark": "^v[0-9]*\\.[0-9]*\\.[0-9a-z]*$",
 }


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

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: If1bb64722bd24b0079d2427ea3b0f5b5c87ef7ac
Gerrit-Change-Number: 34953
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: Introduce mp_hnbgw_timer_x31

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

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

Change subject: hnbgw: Introduce mp_hnbgw_timer_x31
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34951?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: I176ef96e193f2ca39077bcee3a2187768ddb45ce
Gerrit-Change-Number: 34951
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 11:57:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31

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

osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email )

Change subject: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I98e1d4d649ea07b006a7d4c15f8d94a9b4b3de1d
Gerrit-Change-Number: 34952
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 11:56:25 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in docker-playground[master]: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31

2023-11-02 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/34952?usp=email )


Change subject: ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31
..

ttcn3-hnbgw: Use new module param mp_hnbgw_timer_x31

Depends: osmo-ttcn3-hacks.git I176ef96e193f2ca39077bcee3a2187768ddb45ce
Change-Id: I98e1d4d649ea07b006a7d4c15f8d94a9b4b3de1d
---
M ttcn3-hnbgw-test/HNBGW_Tests.cfg
M ttcn3-hnbgw-test/osmo-hnbgw.cfg
2 files changed, 13 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/52/34952/1

diff --git a/ttcn3-hnbgw-test/HNBGW_Tests.cfg b/ttcn3-hnbgw-test/HNBGW_Tests.cfg
index a76d5fd..9a7e1b9 100644
--- a/ttcn3-hnbgw-test/HNBGW_Tests.cfg
+++ b/ttcn3-hnbgw-test/HNBGW_Tests.cfg
@@ -109,6 +109,8 @@
}
 };
 HNBGW_Tests.mp_validate_talloc_asn1 := true;
+# keep in sync with osmo-hnbgw.cfg "timer hnbgw x31":
+HNBGW_Tests.mp_hnbgw_timer_x31 := 5;

 [MAIN_CONTROLLER]

diff --git a/ttcn3-hnbgw-test/osmo-hnbgw.cfg b/ttcn3-hnbgw-test/osmo-hnbgw.cfg
index 377fad8..3361cb0 100644
--- a/ttcn3-hnbgw-test/osmo-hnbgw.cfg
+++ b/ttcn3-hnbgw-test/osmo-hnbgw.cfg
@@ -71,6 +71,7 @@
  mgcp
   mgw local-ip 172.18.35.20
   mgw remote-ip 172.18.35.203
+ timer hnbgw x31 5
  # don't spam RANAP RESET messages for up to eight CN links across all tests
  timer hnbgw T4 60


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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I98e1d4d649ea07b006a7d4c15f8d94a9b4b3de1d
Gerrit-Change-Number: 34952
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in osmo-ttcn3-hacks[master]: hnbgw: Introduce mp_hnbgw_timer_x31

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


Change subject: hnbgw: Introduce mp_hnbgw_timer_x31
..

hnbgw: Introduce mp_hnbgw_timer_x31

The default value of the timer changed recently, and made some tests
which were using some timer hardcoded values fail.
Add this configurable option to adapt the test behavior to the
osmo-hnbgw configuration. This way we can also set it to lower values in
order to avoid waiting too much time.

Change-Id: I176ef96e193f2ca39077bcee3a2187768ddb45ce
---
M hnbgw/HNBGW_Tests.ttcn
M hnbgw/osmo-hnbgw.cfg
2 files changed, 21 insertions(+), 1 deletion(-)



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

diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 4afb8dd..505beab 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -194,6 +194,10 @@
charstring mp_pfcp_ip_remote := "127.0.0.2";

boolean mp_validate_talloc_asn1 := true;
+
+   /* The X31 timer configured at osmo-hnbgw (seconds). This provided an 
idea on
+* minimum time the test must wait to consider this timer triggered */
+   integer mp_hnbgw_timer_x31 := 5;
 }

 function MSC_UnitdataCallback(RANAP_PDU ranap) runs on RAN_Emulation_CT return 
template RANAP_PDU {
@@ -763,7 +767,7 @@
 template RANAP_PDU exp_rx := omit)
 runs on ConnHdlr return RANAP_PDU {
var RANAP_PDU rx
-   timer T := 10.0;
+   timer T := int2float(mp_hnbgw_timer_x31) + 1.0;

if (istemplatekind(exp_rx, "omit")) {
exp_rx := tx;
diff --git a/hnbgw/osmo-hnbgw.cfg b/hnbgw/osmo-hnbgw.cfg
index 3ccc28d..edd8c21 100644
--- a/hnbgw/osmo-hnbgw.cfg
+++ b/hnbgw/osmo-hnbgw.cfg
@@ -49,6 +49,7 @@
   local-ip 127.0.0.1
   local-port 29169
   hnbap-allow-tmsi 1
+ timer hnbgw x31 5
  # don't spam RANAP RESET messages for up to eight CN links across all tests
  timer hnbgw T4 60


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34951?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: I176ef96e193f2ca39077bcee3a2187768ddb45ce
Gerrit-Change-Number: 34951
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in osmo-hnbgw[master]: context_map_sccp: Fix assert hit due to missing ev handling

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

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

Change subject: context_map_sccp: Fix assert hit due to missing ev handling
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34950?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: Idaad11eaa3c2e56de792f80bab1f1d8435ef9b68
Gerrit-Change-Number: 34950
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Thu, 02 Nov 2023 11:17:46 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in osmo-hnbgw[master]: context_map_sccp: Fix assert hit due to missing ev handling

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

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

Change subject: context_map_sccp: Fix assert hit due to missing ev handling
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
This started happening because some tests were waiting for 10 seconds and now 
X31 is 15 seconds, so a different code path started being executed.
I'll submit a patch fixing the timer timeout value lowering it back to 5 in the 
tests.



--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34950?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: Idaad11eaa3c2e56de792f80bab1f1d8435ef9b68
Gerrit-Change-Number: 34950
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: neels 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 02 Nov 2023 11:15:29 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in osmo-hnbgw[master]: context_map_sccp: Fix assert hit due to missing ev handling

2023-11-02 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-hnbgw/+/34950?usp=email )


Change subject: context_map_sccp: Fix assert hit due to missing ev handling
..

context_map_sccp: Fix assert hit due to missing ev handling

This was being triggered recently by
HNBGW_Tests.TC_ranap_cs_mo_disconnect in osmo-ttcn3-hacks.git.

Change-Id: Idaad11eaa3c2e56de792f80bab1f1d8435ef9b68
---
M src/osmo-hnbgw/context_map_sccp.c
1 file changed, 13 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/50/34950/1

diff --git a/src/osmo-hnbgw/context_map_sccp.c 
b/src/osmo-hnbgw/context_map_sccp.c
index 9b4837d..4a78337 100644
--- a/src/osmo-hnbgw/context_map_sccp.c
+++ b/src/osmo-hnbgw/context_map_sccp.c
@@ -452,6 +452,7 @@
handle_rx_sccp(fi, ranap_msg);
return;

+   case MAP_SCCP_EV_RAN_LINK_LOST:
case MAP_SCCP_EV_USER_ABORT:
case MAP_SCCP_EV_CN_LINK_LOST:
/* Stop waiting for RLSD, send RLSD now. */

--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/34950?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: Idaad11eaa3c2e56de792f80bab1f1d8435ef9b68
Gerrit-Change-Number: 34950
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


[S] Change in pysim[master]: filesystem: add flag to tell whether an ADF supports an FS or not

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

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

Change subject: filesystem: add flag to tell whether an ADF supports an FS or 
not
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> Unfortunately I could not find any hard evidence on this but I think you are 
> right here. […]
(btw: I noticed that the select response from ADF.ARA-M is just 9000, so it is 
really different. I think a real ADF should return a UICC-typical response with 
FCP)



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34902?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: Ifd0f7c34164685ea18d8a746394e55416fa0aa66
Gerrit-Change-Number: 34902
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 10:36:57 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: dexter 
Gerrit-MessageType: comment


[S] Change in pysim[master]: filesystem: add flag to tell whether an ADF supports an FS or not

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

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

Change subject: filesystem: add flag to tell whether an ADF supports an FS or 
not
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> strictly speaking, in terms of terminology an application with AID and no 
> filesystem probably doesn' […]
Unfortunately I could not find any hard evidence on this but I think you are 
right here. Probably applications which do not support a file system won't have 
an ADF. The only reason why one would want to have an ADF despite this is that 
an ADF would allow the selection of the application via a 2 byte FID.

This probably also means that it is incorrect to have the ADF.ARA-M in the file 
system tree at all. However, it is a very handy extension to have such virtual 
ADFs. So what would speak against having the proposed has_fs flag that tells 
pySim that there is no FS behind this ADF?

If we want to express this in the class model we could have a CardObj that is 
above CardFile and has the most basic methods and properties that are not file 
system related in particular.

Then We could create a new type of CardADF that directly inherits from CardObj. 
We could call it "CardAPP". We would still make those appear in the file system 
tree but with a name that makes clear that it is a normal card applet without 
file system support.



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34902?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: Ifd0f7c34164685ea18d8a746394e55416fa0aa66
Gerrit-Change-Number: 34902
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 10:25:53 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


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

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

osmith 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 3: Code-Review+1


--
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: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 02 Nov 2023 10:14:44 +
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-02 Thread pespin
Attention is currently required from: daniel, fixeria, osmith.

pespin 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 3:

(2 comments)

Patchset:

PS2:
> Where this function is coming from? Neither I can find it in 
> osmo-ttcn3-hacks. […]
ACK that was the problem, the SCCP_Emulations was not in our library/ 
dirrectory. I changed the patch to have it working without needing to modify 
the dep.


File library/SCCP_Templates.ttcn:

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



--
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: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Thu, 02 Nov 2023 10:13:15 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


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

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

Hello Jenkins Builder, daniel, fixeria, osmith,

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

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34923?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: sccp: Introduce test TC_cr_timeout_cc_too_late
..

sccp: Introduce test TC_cr_timeout_cc_too_late

Related: SYS#6602
Change-Id: If4b53565f1fa19894ca24fa71e02ae7b1941411e
---
M library/SCCP_Templates.ttcn
M sccp/SCCP_Tests_RAW.ttcn
2 files changed, 112 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/23/34923/3
--
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: 3
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-MessageType: newpatchset


[M] Change in osmo-ttcn3-hacks[master]: epdg: Test Handover from Wifi back to LTE

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

Change subject: epdg: Test Handover from Wifi back to LTE
..

epdg: Test Handover from Wifi back to LTE

The Handover is informed to the EPDG by the PGW, who sends a
DeleteBearerRequest when receiving an attach from the 3GPP network once
the phone has jumped there.

Related: OS#6046
Change-Id: I299faf28fa51dbc5d2de6c72a39a01eca67a5775
---
M epdg/EPDG_Tests.ttcn
M library/GTPv2_Templates.ttcn
2 files changed, 82 insertions(+), 19 deletions(-)

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




diff --git a/epdg/EPDG_Tests.ttcn b/epdg/EPDG_Tests.ttcn
index e7c8633..99a4721 100644
--- a/epdg/EPDG_Tests.ttcn
+++ b/epdg/EPDG_Tests.ttcn
@@ -112,20 +112,27 @@
 };


+type record BearerConfig {
+/* EPS Bearer ID */
+   uint4_t ebi optional,
+   /* TEI (Data) local side */
+   OCT4teid_local optional,
+   /* TEI (Data) remote side */
+   OCT4 teid_remote optional
+};
+
 type record EPDG_ConnHdlrPars {
hexstring imsi,
charstring apn,
charstring ue_ip,

-   /* TEI (Data) local side */
-   OCT4 teid,
/* TEI (Control) local side */
-   OCT4 teic,
-   /* TEI (Data) remote side */
-   OCT4 teid_remote optional,
+   OCT4 teic_local,
/* TEI (Control) remote side */
OCT4 teic_remote optional,

+   BearerConfig bearer optional,
+
AuthVector vec optional
 };

@@ -146,10 +153,13 @@
imsi := f_gen_imsi(imsi_suffix),
apn := "internet",
ue_ip := "192.168.123.50",
-   teid := ''O,
-   teic := ''O,
-   teid_remote := omit,
+   teic_local := ''O,
teic_remote := omit,
+   bearer := {
+   ebi := omit,
+   teid_local := omit,
+   teid_remote := omit
+   },
vec := f_gen_auth_vec_3g()
};
return pars;
@@ -391,31 +401,34 @@
 /* Diameter SWx SAR + SAA. */
 private altstep as_GTP2C_CreateSession_success() runs on EPDG_ConnHdlr {
var PDU_GTPCv2 rx_msg;
+   var BearerContextIEs rx_bctx_ies;
var template (value) FullyQualifiedTEID fteid_c_ie, fteid_u_ie;
var template (value) PDN_AddressAllocation paa;
-   var uint4_t bid;
var template (value) BearerContextIEs bctx_ies;

[] GTP2.receive(tr_GTP2C_CreateSessionReq(g_pars.imsi)) -> value rx_msg 
{
-   /* TODO: parse TEIC and TEID and store it in 
g_pars.remote_tei{c,d} */
-   bid := 
rx_msg.gtpcv2_pdu.createSessionRequest.bearerContextGrouped[0].bearerContextIEs.ePS_Bearer_ID.ePS_Bearer_ID_Value;
+   /* Parse TEIC and Bearer EBI and TEID and store it in g_pars */
+   g_pars.teic_remote := 
rx_msg.gtpcv2_pdu.createSessionRequest.fullyQualifiedTEID[0].tEID_GRE_Key;
+   rx_bctx_ies := 
rx_msg.gtpcv2_pdu.createSessionRequest.bearerContextGrouped[0].bearerContextIEs;
+   g_pars.bearer.ebi := 
rx_bctx_ies.ePS_Bearer_ID.ePS_Bearer_ID_Value;
+   g_pars.bearer.teid_remote := 
rx_bctx_ies.fullyQualifiedTEID[0].tEID_GRE_Key;

/* allocate + register TEID-C on local side */
-   g_pars.teic := f_gtp2_allocate_teid();
-   g_pars.teid := g_pars.teic;
+   g_pars.teic_local := f_gtp2_allocate_teid();
+   g_pars.bearer.teid_local := g_pars.teic_local;

/* Upon rx of CreateSession, emulate PGW asking the AAA server. 
*/
f_S6b_AA_success();

-   fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S2b_ePDG_GTPC, 
g_pars.teic, 0,
+   fteid_c_ie := ts_GTP2C_FTEID(FTEID_IF_S2b_ePDG_GTPC, 
g_pars.teic_local, 0,
f_inet_addr(mp_s2b_local_ip), omit);
-   fteid_u_ie := ts_GTP2C_FTEID(FTEID_IF_S2bU_ePDG_GTPU, 
g_pars.teid, 2,
+   fteid_u_ie := ts_GTP2C_FTEID(FTEID_IF_S2bU_ePDG_GTPU, 
g_pars.bearer.teid_local, 2,
f_inet_addr(mp_s2b_local_ip), omit);
paa := ts_GTP2C_PdnAddrAlloc_v4(f_inet_addr(g_pars.ue_ip));
-   bctx_ies := ts_GTP2C_BcContextIE(bid := bid,
+   bctx_ies := ts_GTP2C_BcContextIE(ebi := g_pars.bearer.ebi,
 teid_list := { fteid_u_ie },
 qos := 
ts_GTP2C_BearerQos('09'O, 0,0,0,0),
-charging_id := 
ts_GTP2C_ChargingID(g_pars.teic));
+charging_id := 
ts_GTP2C_ChargingID(g_pars.teic_local));

[M] Change in osmo-ttcn3-hacks[master]: epdg: Test Handover from Wifi back to LTE

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

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

Change subject: epdg: Test Handover from Wifi back to LTE
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34895?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: I299faf28fa51dbc5d2de6c72a39a01eca67a5775
Gerrit-Change-Number: 34895
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Thu, 02 Nov 2023 10:00:35 +
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-02 Thread pespin
Attention is currently required from: laforge, neels.

pespin 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: Code-Review+1


--
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-Reviewer: pespin 
Gerrit-CC: dexter 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:45:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

pespin 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


--
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-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:43:49 +
Gerrit-HasComments: No
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-02 Thread pespin
Attention is currently required from: dexter, keith, neels, osmith.

pespin 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)

File src/libosmo-mgcp/mgcp_conn.c:

https://gerrit.osmocom.org/c/osmo-mgw/+/34150/comment/184051ed_61bd0d75
PS3, Line 363:  if (!conn) {
unneeded {}



--
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: neels 
Gerrit-Attention: keith 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:42:45 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

Change subject: add mgcp_conn_rtp_type_names[]
..


Patch Set 1: Code-Review+1


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: neels 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:39:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34949?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: I7932bab7c81a2314c1b9477f50b82a46f24d074e
Gerrit-Change-Number: 34949
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:37:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34948?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: Icec1698851471af7f76f20201dcdcfcd48ddf365
Gerrit-Change-Number: 34948
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:36:53 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:36:28 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1:

(1 comment)

File pySim/utils.py:

https://gerrit.osmocom.org/c/pysim/+/34946/comment/b4ad869f_67aac80d
PS1, Line 1476: if not all(c in string.hexdigits for c in instr):
you can probably return is_hexstr here.



--
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-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:34:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


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

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

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

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


Patch Set 2: Code-Review+1


--
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-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:34:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/pysim/+/34944/comment/befebcdf_1d7ede46
PS1, Line 7: pySim-shell: Use arparser for verify_adm to support --help
argparser



--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:27:27 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:25:31 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:25:08 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:23:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:20:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34938?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: I11e66757f10cc28fda547244ae09d51dacd70824
Gerrit-Change-Number: 34938
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:20:14 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1:

(1 comment)

File docs/shell.rst:

https://gerrit.osmocom.org/c/pysim/+/34937/comment/fc14d713_e999c6fe
PS1, Line 53: As pySim-shell is built upon ``cmd``, some generic cmd2 
commands/features are available.  You may
upon cmd2?



--
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-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:12:18 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:11:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

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


Patch Set 1: Code-Review+1


--
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-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:11:09 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

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

Change subject: PCUIF: upgrade to PCUIF v12
..


Patch Set 4: Code-Review+1


--
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-Reviewer: pespin 
Gerrit-Attention: dexter 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:10:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

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

pespin 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+2


--
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: dexter 
Gerrit-Comment-Date: Thu, 02 Nov 2023 09:08:45 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


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

2023-11-02 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34896?usp=email )

Change subject: s2b: Implement GTPv2C DeleteBearerReq
..

s2b: Implement GTPv2C DeleteBearerReq

Sessions are now stored/kept upon CreateSession time until deleted
through DeleteBearerReq.

Related: OS#6046
Change-Id: I1e5af1ead17385d2e494f4c90ffe6455aee850da
---
M src/epdg_gtpc_s2b.erl
1 file changed, 137 insertions(+), 26 deletions(-)

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




diff --git a/src/epdg_gtpc_s2b.erl b/src/epdg_gtpc_s2b.erl
index 82985a5..a5658f1 100644
--- a/src/epdg_gtpc_s2b.erl
+++ b/src/epdg_gtpc_s2b.erl
@@ -70,7 +70,9 @@
 rport   :: non_neg_integer(),
 restart_counter :: 0..255,
 seq_no  :: 0..16#,
-sess_list %% TODO: fill it, list of gtp_session
+next_local_control_tei = 1 :: 0..16#,
+next_local_data_tei = 1 :: 0..16#,
+sessions = sets:new()
 }).

 -record(gtp_bearer, {
@@ -134,36 +136,45 @@
 gen_server:call(?SERVER,
   {gtpc_create_session_req, {Imsi}}).

-handle_call({gtpc_create_session_req, {Imsi}}, _From, State) ->
-Sess = new_gtp_session(Imsi, State),
-Req = gen_create_session_request(Sess, State),
+handle_call({gtpc_create_session_req, {Imsi}}, _From, State0) ->
+{Sess0, State1} = find_or_new_gtp_session(Imsi, State0),
+Req = gen_create_session_request(Sess0, State1),
 %TODO: increment State.seq_no.
-tx_gtp(Req, State),
+tx_gtp(Req, State1),
 lager:debug("Waiting for CreateSessionResponse~n", []),
 receive
 {udp, _Socket, IP, InPortNo, RxMsg} ->
 try
 Resp = gtp_packet:decode(RxMsg),
-logger:info("s2b: Rx from IP ~p port ~n ~p~n", [IP, InPortNo, 
Resp]),
-%% TODO: store Sess in State.
-{reply, {ok, Resp}, State}
+lager:info("s2b: Rx from IP ~p port ~p ~p~n", [IP, InPortNo, 
Resp]),
+Sess1 = update_gtp_session_from_create_session_response(Resp, 
Sess0),
+lager:info("s2b: Updated Session after 
create_session_response: ~p~n", [Sess1]),
+State2 = update_gtp_session(Sess0, Sess1, State1),
+{reply, {ok, Resp}, State2}
 catch Any ->
-logger:error("Error sending message to receiver, ERROR: ~p~n", 
[Any]),
-{reply, {error, decode_failure}, State}
+lager:error("Error sending message to receiver, ERROR: ~p~n", 
[Any]),
+{reply, {error, decode_failure}, State1}
 end
 after 5000 ->
-logger:error("Timeout waiting for CreateSessionResponse for ~p~n", 
[Req]),
-{reply, timeout, State}
+lager:error("Timeout waiting for CreateSessionResponse for ~p~n", 
[Req]),
+{reply, timeout, State1}
 end.

 %% @callback gen_server
 handle_cast(stop, State) ->
 {stop, normal, State};
-handle_cast(_Req, State) ->
+handle_cast(Req, State) ->
+lager:info("S2b handle_cast: ~p ~n", [Req]),
 {noreply, State}.

 %% @callback gen_server
-handle_info(_Info, State) ->
+handle_info({udp, _Socket, IP, InPortNo, RxMsg}, State) ->
+lager:info("S2b: Rx from IP ~p port ~p: ~p~n", [IP, InPortNo, RxMsg]),
+Req = gtp_packet:decode(RxMsg),
+lager:info("S2b: Rx from IP ~p port ~p: ~p~n", [IP, InPortNo, Req]),
+rx_gtp(Req, State);
+handle_info(Info, State) ->
+lager:info("S2b handle_info: ~p ~n", [Info]),
 {noreply, State}.

 %% @callback gen_server
@@ -185,6 +196,76 @@
 %% Internal Function Definitions
 %% --

+new_gtp_session(Imsi, State) ->
+% TODO: find non-used local TEI inside State
+Bearer = #gtp_bearer{
+ebi = 5,
+local_data_tei = State#gtp_state.next_local_data_tei
+},
+Sess = #gtp_session{imsi = Imsi,
+apn = ?APN,
+local_control_tei = State#gtp_state.next_local_control_tei,
+bearer = Bearer
+},
+NewSt = State#gtp_state{next_local_control_tei = 
State#gtp_state.next_local_control_tei + 1,
+next_local_data_tei = 
State#gtp_state.next_local_data_tei + 1,
+sessions = sets:add_element(Sess, 
State#gtp_state.sessions)},
+{Sess, NewSt}.
+
+% returns Sess if found, undefined it not
+find_gtp_session_by_imsi(Imsi, State) ->
+sets:fold(
+fun(SessIt = #gtp_session{imsi = Imsi}, _AccIn) -> SessIt;
+   (_, AccIn) -> AccIn
+end,
+undefined,
+State#gtp_state.sessions).
+
+find_or_new_gtp_session(Imsi, State) ->
+Sess = find_gtp_session_by_imsi(Imsi, State),
+case Sess of
+#gtp_session{imsi = Imsi} ->
+{Sess, State};
+undefined ->
+new_gtp_session(Imsi,